-
-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Description
Using Greclipse 4.4.0.v202112282355-e2009.
Consider the following enum:
package test69b;
public enum MyEnum {
FOO, BAR;
}And the following classes:
package test69
import test69b.MyEnum
class Base {
MyEnum myEnum
}package test69
import groovy.transform.CompileStatic
@CompileStatic
class Ext extends Base {
void foo() {
if(myEnum == MyEnum.FOO)
println 'bla'
}
}Please note that MyEnum is in a different package.
Observed behaviour in Ext:
- Greclipse does not automatically insert an import for
test69b.MyEnum - Greclipse does nothing with Ctrl+Shift+O (organize imports) or Ctrl+Shift+M (add import) on
MyEnuminMyEnum.FOO - no compilation error is produced by Greclipse
- if you hit F3 on
MyEnuminMyEnum.FOO, you'll be directed toBase.myEnumrather than toMyEnumtype - syntax highlighting reflects the fact that
MyEnumis not recognized as a type
If you however try to compile this with groovyc (I tried it through Gradle), compilation correctly fails because MyEnum is not recognized ("[Static type checking] - The variable [MyEnum] is undeclared.").
Metadata
Metadata
Assignees
Labels
No labels