You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to use statically imported fields in annotation array value, it will looks like 'cannot be resolved to a variable' compile error. Actually code compiles and runs fine. It was working about month ago (can not tell exactly version, about mid of November), but right now it is broken.
I am using Groovy-Eclispe: 2.9.2.xx-201612141446-e46
Test.groovy will have two compile errors: 'ONE cannot be resolved to a variable' and the same for TWO. If you replace 'String[] value' to just 'String value', then using '@TestAnnotation(value = ONE)' will not cause this error. If you replace ONE/TWO by TestString.ONE/TWO, this will go away also.
The text was updated successfully, but these errors were encountered:
I'll have a look. As you say, this should work. I have tried to add test cases for as many of these types of scenarios that I can think of. I'm not sure if the star import is the difference here.
This should be fixed now. Also, you could use import aliases on any of those constants and that would work now -- was also broken. Thanks for raising this issue.
If you try to use statically imported fields in annotation array value, it will looks like 'cannot be resolved to a variable' compile error. Actually code compiles and runs fine. It was working about month ago (can not tell exactly version, about mid of November), but right now it is broken.
I am using Groovy-Eclispe: 2.9.2.xx-201612141446-e46
There is simple example:
TestStrings.groovy
TestAnnotation.groovy
Test.groovy
Test.groovy will have two compile errors: 'ONE cannot be resolved to a variable' and the same for TWO. If you replace 'String[] value' to just 'String value', then using '@TestAnnotation(value = ONE)' will not cause this error. If you replace ONE/TWO by TestString.ONE/TWO, this will go away also.
The text was updated successfully, but these errors were encountered: