You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniil Ovchinnikov (Jira)" <ji...@apache.org> on 2019/12/04 13:12:00 UTC
[jira] [Created] (GROOVY-9327) @CompileStatic is not propagated to
anonymous class
Daniil Ovchinnikov created GROOVY-9327:
------------------------------------------
Summary: @CompileStatic is not propagated to anonymous class
Key: GROOVY-9327
URL: https://issues.apache.org/jira/browse/GROOVY-9327
Project: Groovy
Issue Type: Bug
Components: Static compilation, Static Type Checker
Affects Versions: 2.5.8
Reporter: Daniil Ovchinnikov
{code:java}
@groovy.transform.CompileStatic
def method() {
new Runnable() {
@Override
void run() {
foo // invalid reference
}
}
} {code}
Expected: Error:(6, 13) Groovyc: [Static type checking] - The variable [foo] is undeclared.
Actual: no error is reported.
Note that annotating {{run}} method works properly, i.e. the error is reported.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)