ceylon/ceylon-compiler — Issue #396: Corner case for accessing protected members
Author: tombentley
Created: 2012-02-23 13:33:21+00:00
State: open

Although the fixes for #339 will address access to protected members of Java superclasses, they do so only when accessed on `this` and `super`, and not on an arbitrary instance, so for example the following is rejected by the ceylon typechecker even though it should be permitted:

```
class RefinesAndCallProtectedAccessMethod() extends JavaAccessModifiers() {
void foo(JavaAccessModifiers bar) {
bar.protectedAccessMethod();
}
}
```

Fixing this is not a priority (not for M2).