mirror of
https://github.com/erg-lang/erg.git
synced 2025-07-07 21:25:31 +00:00
12 lines
165 B
Python
12 lines
165 B
Python
v = ![]
|
|
v.push! 1
|
|
|
|
w = v
|
|
print! w
|
|
print! v # this should cause a MoveError
|
|
|
|
push! |T| a: RefMut(List!(T, _)), value: T =
|
|
a.push! value
|
|
|
|
push! w, 2
|
|
print! w # OK
|