Guest User

Untitled

a guest
Dec 12th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. type TestObj = ref object
  2. m: seq[int]
  3. proc m0(m: seq[int]): TestObj =
  4. result = TestObj(m: m)
  5.  
  6. var m1 = m0(@[1,2])
  7. var m2 = m1
  8.  
  9. echo m1.repr
  10.  
  11. echo m2.repr
  12.  
  13. m1.m.add(238)
  14.  
  15. echo m1.repr
  16. echo m2.repr
Add Comment
Please, Sign In to add comment