Weird error when using default params in traits

When I create a groovy method with default param in a trait in IntelliJ IDEA 14,

trait foo {
     def bar(int a=123) {
          // do something
     }
}


the IDE mark this an error by red wavy line. The error msg is "default initializers are not allowed in abstract method".

However the program can run correctly. No compile/runtime error at all.

Does anybody know what's going on?

Thanks.

0

Please sign in to leave a comment.