Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.0-beta-5
-
None
Description
The ModuleNode.createStatementsClass() seems add a constructor that calls the super's constructor with a Binding object, which does not exist.
It looks like this after decompiled by Jad.
public FuncLoose(Binding binding)
{ super(binding); }The code won't compile of course.
I tried changing the logic in the createStatementClass() to look like this:
classNode.addConstructor(
ACC_PUBLIC,
new Parameter[]
,
new ExpressionStatement(
new MethodCallExpression(
new VariableExpression("super"),
"setBinding",
new ArgumentListExpression(
new Expression[]
))));
This time it generates the constructor in the right form:
public FuncLoose(Binding binding)
{ super.setBinding(binding); }Unfortunately it won't run, with a verfication error:
java.lang.VerifyError: (class: FuncLoose, method: <init> signature: (Lgroovy/lang/Binding;)V) Expecting to find object/array on stack
There must be inconsistency somewhere...