Retoor software development Projects Research SearchXNG
Register Sign In

16 lines
251 B
Plaintext
Raw Normal View History

test: add test for lowercase class name reference inside class body Add a new test file `lowercase_name_inside_body.wren` that verifies a class can correctly reference its own lowercase name from both static and instance methods. The test ensures that `foo` resolves to the class itself in static context and to the instance method `foo` in instance context, addressing issue #251.
2015-04-25 19:47:55 +02:00
class foo {
static callFoo {
IO.print(foo)
}
callFoo {
IO.print(foo)
}
foo { "instance foo method" }
static foo { "static foo method" }
}
foo.callFoo // expect: static foo method
(new foo).callFoo // expect: instance foo method
Reference in New Issue Copy Permalink
448ef51183
wren/test/language/class/lowercase_name_inside_body.wren
Response time: 53ms
Mail Licenses API