[ 
https://issues.apache.org/jira/browse/GROOVY-6478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun resolved GROOVY-6478.
--------------------------------
    Resolution: Fixed

> 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)

Reply via email to