You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/10/25 14:18:00 UTC

[jira] [Assigned] (GROOVY-8365) Static and static star imports allow non fully qualified names

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

Eric Milles reassigned GROOVY-8365:
-----------------------------------

    Assignee: Eric Milles

> Static and static star imports allow non fully qualified names
> --------------------------------------------------------------
>
>                 Key: GROOVY-8365
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8365
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Daniil Ovchinnikov
>            Assignee: Eric Milles
>            Priority: Major
>
> {code:title=bugs/classes.groovy}
> package bugs
> class ClassInTheSamePackage {
>   static foo() { 42 }
>   static class Inner {}
> }
> {code}
> {code:title=bugs/test.groovy}
> package bugs
> import static ClassInTheSamePackage.*
> println foo() // 42
> println new Inner() // bugs.ClassInTheSamePackage$Inner@159f197
> {code}
> Expected: {{ClassInTheSamePackage}} should be unresolved, and consequently {{foo}} and {{Inner}} will not resolve too 
>   OR this "feature" should be documented.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)