Interface implemented by groovy trait are not resolved

This is my sample code.

interface A{
public void action()
}

trait B implemets A{
public void action(){//do something}
}

class C implemets A,B{
//IntelliJ Report a error that this class did not yet implemets method action()
}



I dont know is there any way to solve this? Or how can I disable the error warning?

5 comments
Comment actions Permalink

Hi Alex,

Is your groovy file under source root?

0
Comment actions Permalink

I have a similar and possibly related problem with 14.1.1 build 141.178 in a Grails 3.0.1 project. IntelliJ complains that I need to implement all the methods in the trait.

 
class LoginCmd implements Validateable { ... }

 
trait Validateable { Errors getErrors() {..} }
0
Comment actions Permalink

No. The trait is in another project and complied into a jar.
but in each project, they are under the source root

0
Comment actions Permalink

OK, I've reproduced the bug

0

Please sign in to leave a comment.