[
https://issues.apache.org/jira/browse/GROOVY-6478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149099#comment-18149099
]
Daniel Sun commented on GROOVY-6478:
------------------------------------
Fixed on master; added a regression test in
b3adf048853300d2accd0583449c83d1d10dae99
(https://github.com/apache/groovy/commit/b3adf048853300d2accd0583449c83d1d10dae99).
> inner and first-level classes with the same names
> -------------------------------------------------
>
> Key: GROOVY-6478
> URL: https://issues.apache.org/jira/browse/GROOVY-6478
> Project: Groovy
> Issue Type: Bug
> Reporter: Maxim Medvedev
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 7.0.0-alpha-1
>
>
> Assume you have a class Bar in a package foo, so it's qualified name is
> foo.Bar. Add static method xyz to it.
> {code}
> package foo;
> public class Bar
> public static void xyz(){} // first-level method
> }
> {code}
> Now create a class foo with the following text:
> {code}
> import static foo.Bar.xyz
> class foo {
> static class Bar {
> static xyz(){} // inner class method
> }
> }
> {code}
> The 'import static foo.Bar.xyz' imports the inner class's method if the
> first-level foo.Bar is a java class. But if the first-level foo.Bar is a
> Groovy class the import points to the first-level class's method.
> I think it should be resolved to the first-level class's method in both cases.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)