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.
请先登录再写评论。
Thanks for giving some hints for those who are having trouble.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206632555-Weird-error-when-using-default-params-in-traits uno online