mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 14:18:42 +01:00
Add (failing) tests.
This commit is contained in:
@ -0,0 +1,11 @@
|
||||
class A {
|
||||
callSuperToString {
|
||||
return new Fn { super.toString }.call()
|
||||
}
|
||||
|
||||
toString { "A.toString" }
|
||||
}
|
||||
|
||||
class B is A {}
|
||||
|
||||
IO.print((new B).callSuperToString) // expect: instance of B
|
||||
9
test/language/super/super_in_inherited_method.wren
Normal file
9
test/language/super/super_in_inherited_method.wren
Normal file
@ -0,0 +1,9 @@
|
||||
class A {
|
||||
callSuperToString { super.toString }
|
||||
|
||||
toString { "A.toString" }
|
||||
}
|
||||
|
||||
class B is A {}
|
||||
|
||||
IO.print((new B).callSuperToString) // expect: instance of B
|
||||
Reference in New Issue
Block a user