Files
wren/test/field/in_static_method_in_nested_class.wren
T

15 lines
398 B
Plaintext
Raw Normal View History

2014-01-19 13:01:51 -08:00
// Refering to an instance method in a nested static class should *not* walk
// out to find the nearest enclosing instance method. We could make that work,
// but it's confusing to users, and would require some tricky work to make sure
// the enclosing instance is closed over.
class Outer {
foo {
class Inner {
static bar {
_field = "nope" // expect error
}
}
}
}