### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java,v retrieving revision 1.607 diff -u -r1.607 GenericTypeTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 29 Mar 2007 12:05:59 -0000 1.607 +++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 2 Apr 2007 09:55:14 -0000 @@ -37194,4 +37194,50 @@ "The method compareTo(capture#7-of ? extends Throwable) in the type Comparable is not applicable for the arguments (capture#8-of ? extends Throwable)\n" + "----------\n"); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=166963 +public void test1120() { + this.runNegativeTest( + new String[] { + "X.java", + "public class X {\n" + + " public X() {\n" + + " System.out.println();\n" + + " this(zork);\n" + + " Zork.this.this();\n" + + " this();\n" + + " }\n" + + "}", // ================= + }, + "----------\n" + + "1. ERROR in X.java (at line 4)\n" + + " this(zork);\n" + + " ^^^^^^^^^^^\n" + + "Constructor call must be the first statement in a constructor\n" + + "----------\n" + + "2. ERROR in X.java (at line 4)\n" + + " this(zork);\n" + + " ^^^^\n" + + "zork cannot be resolved\n" + + "----------\n" + + "3. ERROR in X.java (at line 5)\n" + + " Zork.this.this();\n" + + " ^^^^^^^^^^^^^^^^^\n" + + "Constructor call must be the first statement in a constructor\n" + + "----------\n" + + "4. ERROR in X.java (at line 5)\n" + + " Zork.this.this();\n" + + " ^^^^\n" + + "Zork cannot be resolved to a type\n" + + "----------\n" + + "5. ERROR in X.java (at line 6)\n" + + " this();\n" + + " ^^^^\n" + + "Zork cannot be resolved to a type\n" + + "----------\n" + + "6. ERROR in X.java (at line 6)\n" + + " this();\n" + + " ^^^^^^^\n" + + "Constructor call must be the first statement in a constructor\n" + + "----------\n"); +} } #P org.eclipse.jdt.core Index: buildnotes_jdt-core.html =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/buildnotes_jdt-core.html,v retrieving revision 1.5804 diff -u -r1.5804 buildnotes_jdt-core.html --- buildnotes_jdt-core.html 31 Mar 2007 18:46:11 -0000 1.5804 +++ buildnotes_jdt-core.html 2 Apr 2007 09:55:20 -0000 @@ -52,7 +52,9 @@

What's new in this drop

Problem Reports Fixed

-179630 +166963 +[compiler] resolve binding for local variable in ConstructorInvocation +
179630 Compiler parsing tests fail with IBM J2SE 1.4.2, 5.0, and 6.0 (early access)
151787 [compiler] compiler allows assignment to final field in constructor other than through 'this' Index: compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java,v retrieving revision 1.57 diff -u -r1.57 ExplicitConstructorCall.java --- compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java 6 Mar 2007 02:38:48 -0000 1.57 +++ compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java 2 Apr 2007 09:55:20 -0000 @@ -256,6 +256,20 @@ || !methodDeclaration.isConstructor() || ((ConstructorDeclaration) methodDeclaration).constructorCall != this) { scope.problemReporter().invalidExplicitConstructorCall(this); + // fault-tolerance + if (this.qualification != null) { + this.qualification.resolveType(scope); + } + if (this.typeArguments != null) { + for (int i = 0, max = this.typeArguments.length; i < max; i++) { + this.typeArguments[i].resolveType(scope, true /* check bounds*/); + } + } + if (this.arguments != null) { + for (int i = 0, max = this.arguments.length; i < max; i++) { + this.arguments[i].resolveType(scope); + } + } return; } methodScope.isConstructorCall = true;