fork download
  1. type MyRef = ref object
  2. a: int
  3.  
  4. let a = @[MyRef(a: 1)]
  5. var b: seq[MyRef]
  6.  
  7. b = a
  8.  
  9. b[0].a = 666
  10.  
  11. echo a[0].a
  12. echo b[0].a
Success #stdin #stdout 0s 2376KB
stdin
Standard input is empty
stdout
666
666