mu/immutable-error.mu
Kartik K. Agaram 4de96970f1 3400
Undo commit 3340. Let's standardize names of non-core files to only have
dashes. That's also consistent with the edit/ and sandbox/ apps. Mu
programmers will tend to pervasively use dashes, just like Lisp
programmers.

Scripts will continue to use underscores..
2016-09-18 09:09:00 -07:00

14 lines
219 B
Plaintext

# compare mutable.mu
def main [
local-scope
x:&:num <- new number:type
foo x
]
def foo x:&:num [
local-scope
load-ingredients
*x <- copy 34 # will cause an error because x is immutable in this function
]