Community
Participate
Working Groups
Opening any of the Sencha Touch core .js files (sencha-touch*.js) causes multiple console messages and occasional Eclipse crashes. The console messages are: IMPLEMENT resolveForAllocation for class org.eclipse.wst.jsdt.internal.compiler.ast.MessageSend The following one-line test case is at least one of the problems: x = new (z());
Here's more of a real program to illustrate the bug: function xxx() { return function myConstructor(v) { this.val = v; }; } function testNew() { var rectangleConstructor = xxx(); var r = new rectangleConstructor(99); alert ("value is " + r.val ); var r2 = new (xxx())(99); // should be same behavior as above alert ("value is " + r2.val ); };
Created attachment 187449 [details] One-line Fix for 333387 I've attached a patch with a fix. It's not clear to me what the purpose of the switch statement in the resolveForAllocation method in Expression.java is. Why isn't it the same as the resolveForAllocation method in FunctionExpression.java. In any case, the switch expression should include IASTNode.FUNCTION_CALL
Patch looks good...should be able to get this in 3.2.4.
Checked into 3.2.4 and HEAD.