about summary refs log tree commit diff stats
path: root/immutable_error.mu
blob: b75e27917b3d06865261e0a782c8d55fc512d0e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# compare mutable.mu

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

def foo x:address:number [
  local-scope
  load-ingredients
  *x <- copy 34  # will cause an error because x is immutable in this function
]