ChaiScript/unittests/3.x/operator_overload.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

10 lines
130 B
ChaiScript

def Bob::`+`(y) { this.x + y.x }
def Bob::Bob() { }
attr Bob::x
var b = Bob()
var c = Bob()
b.x = 4
c.x = 5
assert_equal(9, b+c)