about summary refs log blame commit diff stats
path: root/archive/1.vm/mutable.mu
blob: 1a1ec7f08a6e43e7b301a335b946a563852bd376 (plain) (tree)
4a48bedc pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: 
# compare immutable-error.mu

def main [
  local-scope
  x:&:num <- new number:type
  foo x
]

def foo x:&:num -> x:&:num [
  local-scope
  load-inputs
  *x <- copy 34
]
1 # valgrind requires Linux valgrind --leak-check=yes --num-callers=40 -q --error-exitcode=1 ./mu_bin test || exit 1 # run on Mac OS without valgrind, and with a hacky fix for the coarser clock #? ./mu_bin test || exit 1 #? sleep 1 done # Layers for Mu apps without Valgrind ./clean ./$BUILD if [[ ! $1 || $1 == chessboard ]] then echo "=== chessboard" ./mu_bin test chessboard.mu || exit 1 fi # slices of edit/ for Travis CI if [[ ! $1 || $1 == edit ]] then echo "=== edit: until 001" ./mu_bin test edit/001* || exit 1 echo "=== edit: until 002" ./mu_bin test edit/00[1-2]* || exit 1 echo "=== edit: until 003" ./mu_bin test edit/00[1-3]* || exit 1 fi if [[ ! $1 || $1 == edit2 ]] then echo "=== edit: until 004" ./mu_bin test edit/00[1-4]* || exit 1 echo "=== edit: until 005" ./mu_bin test edit/00[1-5]* || exit 1 echo "=== edit: until 006" ./mu_bin test edit/00[1-6]* || exit 1 fi if [[ ! $1 || $1 == edit3 ]] then echo "=== edit: until 007" ./mu_bin test edit/00[1-7]* || exit 1 echo "=== edit: until 008" ./mu_bin test edit/00[1-8]* || exit 1 echo "=== edit: until 009" ./mu_bin test edit/00* || exit 1 fi if [[ ! $1 || $1 == edit4 ]] then echo "=== edit: until 010" ./mu_bin test edit/00* edit/010* || exit 1 echo "=== edit: until 011" ./mu_bin test edit/00* edit/01[01]* || exit 1 echo "=== edit: until 012" ./mu_bin test edit/00* edit/01[0-2]* || exit 1 fi