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 2020/07/23 14:17:05 UTC
[jira] [Closed] (GROOVY-9581) コンパイラで、クロージャから静的クラス変数を参照できない.
[ https://issues.apache.org/jira/browse/GROOVY-9581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-9581.
-----------------------------
> コンパイラで、クロージャから静的クラス変数を参照できない.
> -----------------------------
>
> Key: GROOVY-9581
> URL: https://issues.apache.org/jira/browse/GROOVY-9581
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 3.0.4, 2.5.12
> Environment: groovy-3.0.4, jdk-14.0.1
> Reporter: Kunio Himei
> Assignee: Eric Milles
> Priority: Critical
> Fix For: 4.0.0-alpha-1, 3.0.5, 2.5.13
>
>
> {code}
> /*
> ERROR:Groovyc: While compiling XXX: BUG!
> exception in phase 'class generation' in source unit 'Test.groovy'
> Trying to access private field [Test1#foo] from inner class
> */
> class Test1 {
> // boolean foo // OK
> static boolean foo // Ng
> }
> class Test2 extends Test1 {
> def bar() {
> Closure baz = {
> assert foo // Compilation error
> }
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)