mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 08:46:53 +08:00
7 lines
118 B
ChaiScript
7 lines
118 B
ChaiScript
attr bob::z
|
|
def bob::bob() { this.z = 10 }
|
|
auto x = bob()
|
|
def bob::fred(x) { this.z - x }
|
|
|
|
assert_equal(7, x.fred(3))
|