You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (Jira)" <ji...@apache.org> on 2019/09/02 16:17:00 UTC
[jira] [Assigned] (GROOVY-9243) Fail to resolve nested type defined
in base type written in Groovy
[ https://issues.apache.org/jira/browse/GROOVY-9243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Sun reassigned GROOVY-9243:
----------------------------------
Fix Version/s: 3.0.0-beta-4
Assignee: Daniel Sun
Priority: Major (was: Minor)
> Fail to resolve nested type defined in base type written in Groovy
> ------------------------------------------------------------------
>
> Key: GROOVY-9243
> URL: https://issues.apache.org/jira/browse/GROOVY-9243
> Project: Groovy
> Issue Type: Bug
> Reporter: Daniel Sun
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 3.0.0-beta-4
>
>
> *file Base.groovy:*
> {code:java}
> package groovy.bugs.groovy9243
> class Base {
> static class X {}
> }
> {code}
> *file Main.groovy:*
> {code:java}
> package groovy.bugs.groovy9243
> class Groovy9243 extends Base {
> def accessX() {
> assert new X()
> }
> }
> new Groovy9243().accessX()
> {code}
> compile Main.groovy with groovyc: {{unable to resolve class X}}
> Here is a workaround:
> *file Main.groovy:*
> {code:java}
> package groovy.bugs.groovy9243
> class Groovy9243 extends Base {
> def accessX() {
> assert new Base.X() // qualify the type name
> }
> }
> new Groovy9243().accessX()
> {code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)