[ https://issues.apache.org/jira/browse/GROOVY-11323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles resolved GROOVY-11323. ---------------------------------- Fix Version/s: 5.0.0-alpha-6 Resolution: Fixed https://github.com/apache/groovy/commit/9a908b0176ea1c45863ff66e15b2be99d2b37cba > Interface default method and static import precedence > ----------------------------------------------------- > > Key: GROOVY-11323 > URL: https://issues.apache.org/jira/browse/GROOVY-11323 > Project: Groovy > Issue Type: Bug > Reporter: Eric Milles > Assignee: Eric Milles > Priority: Major > Fix For: 5.0.0-alpha-6 > > > Consider the following: > {code:groovy} > 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() > {code} > 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()". -- This message was sent by Atlassian Jira (v8.20.10#820010)