aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/test
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-11-08 10:20:52 +0800
committerLi Jin <dragon-fly@qq.com>2022-11-09 11:29:32 +0800
commitb9b1cf94e1324e344df6f7204c8d479329c56718 (patch)
treeb288f3c48bfd17f673968f101f0f6f886f00c3c9 /spec/inputs/test
parent95fd6ea93c2af6fb1707e480669d84ebe37fccbe (diff)
downloadyuescript-b9b1cf94e1324e344df6f7204c8d479329c56718.tar.gz
yuescript-b9b1cf94e1324e344df6f7204c8d479329c56718.tar.bz2
yuescript-b9b1cf94e1324e344df6f7204c8d479329c56718.zip
fix issue #114.
Diffstat (limited to 'spec/inputs/test')
-rw-r--r--spec/inputs/test/class_spec.yue13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/inputs/test/class_spec.yue b/spec/inputs/test/class_spec.yue
index df8bc96..4f7af7c 100644
--- a/spec/inputs/test/class_spec.yue
+++ b/spec/inputs/test/class_spec.yue
@@ -293,3 +293,16 @@ describe "class", ->
293 assert.same 1 + 100 + 12, Sub!\value! 293 assert.same 1 + 100 + 12, Sub!\value!
294 assert.same 6, OtherSub!\value! 294 assert.same 6, OtherSub!\value!
295 295
296 it "should copy metamethod from super", ->
297 class A
298 val: 1
299 <tostring>: => "Object #{ @val }"
300
301 class B extends A
302 val: 2
303
304 a, b = A!, B!
305
306 assert.same "Object 1", tostring a
307 assert.same "Object 2", tostring b
308