Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type TestObj = ref object
- m: seq[int]
- proc m0(m: seq[int]): TestObj =
- result = TestObj(m: m)
- var m1 = m0(@[1,2])
- var m2 = m1
- echo m1.repr
- echo m2.repr
- m1.m.add(238)
- echo m1.repr
- echo m2.repr
Add Comment
Please, Sign In to add comment