fork download
  1. type MyRef = ref object
  2. myProp: int
  3.  
  4. proc doSmt(mr: MyRef) =
  5. mr = MyRef(myProp: 5)
  6.  
  7. let a = MyRef(myProp: 10)
  8. doSmT a
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.nim(5, 3) Error: 'mr' cannot be assigned to
stdout
Standard output is empty