compilation fails with 'no enclosing instance' error

Liam Miller-Cushon cushon at
Thu Feb 13 16:57:07 PST 2014

> Filed


> - The compile-time error appears (incorrectly) whether the static method
> in base.BaseImpl is package access or private. But if the static method is
> public, then everything works fine: attempts to override
>, and a compile-time error occurs because an
> instance method cannot override a static method.

I think the culprit is that Symbol.hiddenIn(...) doesn't consider
visibility. It's incorrectly reporting as being hidden by, which causes an error during lowering when a qualified
base class reference is being synthesized for the invocation.
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the compiler-dev mailing list