groovy-eclipse
groovy-eclipse copied to clipboard
Open class implementing trait in editor or search for trait results in error
Open the class in the Groovy Editor and the error below is logged. This may be related to #175, since the referenced trait is only reconciled to compile phase 3.
MyClass.groovy:
class MyClass implements MyTrait {
}
MyTrait.groovy:
trait MyTrait {
def m() { 'm' }
}
Groovy:Groovy compiler error: exception in phase 'canonicalization' in source unit '...\eclipse-space\Groovy\src\main\traits2\MyClass.groovy' JDTClassNode.getTypeClass() cannot locate class for traits.MyTrait using transform loader groovy.lang.GroovyClassLoader@36edbb99
Error does not occur if MyClass is in a Java source file -- Java does not run the Trait processing that Groovy does.