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

8 lines
159 B
ChaiScript

def bob::bob() { }
def bob::fred(e) : e < 10 { assert_equal(true, e<10) }
def bob::fred(e) { assert_equal(true, e >= 10) }
var b = bob()
b.fred(3)
b.fred(12)