Eric Milles created GROOVY-8063:
-----------------------------------
Summary: Type annotation value referencing inner class is not
properly scoped
Key: GROOVY-8063
URL: https://issues.apache.org/jira/browse/GROOVY-8063
Project: Groovy
Issue Type: Bug
Components: Compiler
Affects Versions: 2.4.8
Reporter: Eric Milles
This code does not generate a compilation error -- it does in Java. Inner
should be unresolvable without a qualifier or import when referenced in the
type annotation.
{code}
@Anno(value=Inner)
class Outer {
static class Inner {}
}
@interface Anno { Class value() }
{code}
For comparison, this code behaves the same in Groovy and Java. VALUE is not
resolvable without a qualifier or static import.
{code}
@Anno(value=VALUE)
class Outer {
public static final Stirng VALUE = ''
}
@interface Anno { String value() }
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)