### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.model Index: src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java,v retrieving revision 1.98 diff -u -r1.98 ReconcilerTests.java --- src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 14 Apr 2006 15:41:36 -0000 1.98 +++ src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 12 May 2006 13:14:22 -0000 @@ -2729,6 +2729,49 @@ } } /* + * Ensures that a method that has a type parameter starting with $ can be reconciled against. + * (regression test for bug 91709 [1.5][model] Quick Fix Error but no Problem Reported) + */ +public void testTypeParameterStartingWithDollar() throws CoreException { + this.workingCopy.discardWorkingCopy(); // don't use the one created in setUp() + this.workingCopy = null; + WorkingCopyOwner owner = new WorkingCopyOwner() {}; + ICompilationUnit workingCopy1 = null; + try { + workingCopy1 = getWorkingCopy( + "/Reconciler15/src/test/Y.java", + "package test;\n"+ + "public class Y<$T> {\n"+ + " void foo($T t);\n"+ + "}\n", + owner, + null /*no problem requestor*/ + ); + + this.problemRequestor = new ProblemRequestor(); + this.workingCopy = getWorkingCopy("Reconciler15/src/test/X.java", "", owner, this.problemRequestor); + setWorkingCopyContents( + "package test;\n"+ + "public class X {\n"+ + " public void bar() {\n"+ + " new Y().foo(\"\");\n" + + " }\n"+ + "}\n" + ); + this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, owner, null); + + assertProblems( + "Unexpected problems", + "----------\n" + + "----------\n" + ); + } finally { + if (workingCopy1 != null) { + workingCopy1.discardWorkingCopy(); + } + } +} +/* * Ensures that a working copy with a type with a dollar name can be reconciled without errors. * (regression test for bug 117121 Can't create class called A$B in eclipse) */ #P org.eclipse.jdt.core Index: model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java,v retrieving revision 1.47 diff -u -r1.47 SourceTypeConverter.java --- model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java 24 Apr 2006 15:04:29 -0000 1.47 +++ model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java 12 May 2006 13:14:23 -0000 @@ -791,7 +791,7 @@ if (!nameStarted) { nameFragmentStart = this.namePos+1; nameStarted = true; - } else + } else if (this.namePos > nameFragmentStart) // handle name starting with a $ (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=91709) identCount ++; break; case Signature.C_GENERIC_START :