ChaiScript/unittests/3.x/object_clone.chai
Jonathan Turner c73f16fdfe Fixing 4.x grammar to be backward compatible.
Added 3.x unit tests back to show this.
2012-05-17 10:14:50 -07:00

12 lines
131 B
ChaiScript

attr bob::z
def bob::bob() { }
var x = bob();
x.z = 10;
var y = clone(x);
y.z = 20;
assert_equal(10, x.z)
assert_equal(20, y.z)