When using the shortened Groovy syntax for class literals as values in Annotations like in the code below
package issue
@Issue(InnerClass)
class IssueMain {
static class InnerClass {
}
static main(args) {
println 'It works!'
}
}
@interface Issue {
Class value()
}
Groovy-Eclipse shows a compilation error in line 3 (InnerClass cannot be resolved or is not a field), despite this being valid Groovy code that compiles and runs fine. When adding a.class suffix to InnerClass, the error disappears.
I used the the following to demonstrate the issue:
Spring Tool Suite
Version: 3.8.3.RELEASE
Build Id: 201612191351
Platform: Eclipse Neon.2 (4.6.2)
Groovy-Eclipse Feature 2.9.2.xx-201701200229-e46
When using the shortened Groovy syntax for class literals as values in Annotations like in the code below
Groovy-Eclipse shows a compilation error in line 3 (
InnerClass cannot be resolved or is not a field), despite this being valid Groovy code that compiles and runs fine. When adding a.classsuffix toInnerClass, the error disappears.I used the the following to demonstrate the issue:
Spring Tool Suite
Version: 3.8.3.RELEASE
Build Id: 201612191351
Platform: Eclipse Neon.2 (4.6.2)
Groovy-Eclipse Feature 2.9.2.xx-201701200229-e46