about summary refs log blame commit diff stats
path: root/archive/1.vm/immutable-error.mu
blob: 25554b2fc2f4e28f86c7e0f99c1b9e8c1013f823 (plain) (tree)
1
2
3
4
5
6
7
8
9



                    
                            


       
                 
             
             

                                                                              
# compare mutable.mu

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

def foo x:&:num [
  local-scope
  load-inputs
  *x <- copy 34  # will cause an error because x is immutable in this function
]
s="p">(void **state); void contact_not_available_when_highest_priority_away(void **state); void contact_not_available_when_highest_priority_xa(void **state); void contact_not_available_when_highest_priority_dnd(void **state); void contact_available_when_highest_priority_online(void **state); void contact_available_when_highest_priority_chat(void **state);