mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
10 lines
130 B
ChaiScript
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)
|