Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-2
-
None
Description
Inside a script, I was writing a new Builder class, by extending BuilderSupport, but I mistakenly implemented the base class, instead of extending it, and I got this error:
IncompatibleClassChangeError: Implementing class
The solution was to replace "implements" with "extends" but the error was misleading and not obious.
Here is a script which shows the problem in action:
println "error"
class GrammarBuilder implements BuilderSupport {
def createNode(name, Map map, closure) {}
void setParent(name, closure) {}
def createNode(name, Map map) {}
Object createNode(name, closure) {}
Object createNode(name) {}
}