Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Consider the following:
import static Bar.* interface Foo { default m() { 'Foo' } } class Bar { static m() { 'Bar' } } class Baz implements Foo { void test() { assert m() == 'Foo' } } new Baz().test()
The implicit-this method call "m()" has two possible sources. Since Foo is a super-interface, it should be the one selected. However, StaticImportVisitor does not detect that option and replaces the method call with "Bar.m()".