You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2023/11/16 11:22:00 UTC
[jira] [Updated] (GROOVY-11224) Reconsider name duplication for groovysh
[ https://issues.apache.org/jira/browse/GROOVY-11224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King updated GROOVY-11224:
-------------------------------
Fix Version/s: (was: 5.0.0-alpha-3)
> Reconsider name duplication for groovysh
> ----------------------------------------
>
> Key: GROOVY-11224
> URL: https://issues.apache.org/jira/browse/GROOVY-11224
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.4.12
> Reporter: Daniil Ovchinnikov
> Assignee: Eric Milles
> Priority: Major
> Labels: breaking, breaking_change
>
> {code:title=foo/Foo.groovy}
> package foo
> class Foo {}
> {code}
> {code:title=test/test.groovy}
> package test
> import foo.Foo as Bar
> class Bar {}
> def regular = new Bar()
> def anonymous = new Bar() {}
> println regular.class // class test.Bar
> println anonymous.class.superclass // class foo.Foo
> {code}
> Either both of the invocations should use alias or both of them should use class defined in the same file.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)