ChaiScript/unittests/object_method_guards.chai

8 lines
155 B
ChaiScript

def bob::bob() { }
def bob::fred(e) : e < 10 { print("e less than 10") }
def bob::fred(e) { print("e is some value") }
var b = bob()
b.fred(3)
b.fred(12)