Lines 2729-2734
Link Here
|
2729 |
} |
2729 |
} |
2730 |
} |
2730 |
} |
2731 |
/* |
2731 |
/* |
|
|
2732 |
* Ensures that a method that has a type parameter starting with $ can be reconciled against. |
2733 |
* (regression test for bug 91709 [1.5][model] Quick Fix Error but no Problem Reported) |
2734 |
*/ |
2735 |
public void testTypeParameterStartingWithDollar() throws CoreException { |
2736 |
this.workingCopy.discardWorkingCopy(); // don't use the one created in setUp() |
2737 |
this.workingCopy = null; |
2738 |
WorkingCopyOwner owner = new WorkingCopyOwner() {}; |
2739 |
ICompilationUnit workingCopy1 = null; |
2740 |
try { |
2741 |
workingCopy1 = getWorkingCopy( |
2742 |
"/Reconciler15/src/test/Y.java", |
2743 |
"package test;\n"+ |
2744 |
"public class Y<$T> {\n"+ |
2745 |
" void foo($T t);\n"+ |
2746 |
"}\n", |
2747 |
owner, |
2748 |
null /*no problem requestor*/ |
2749 |
); |
2750 |
|
2751 |
this.problemRequestor = new ProblemRequestor(); |
2752 |
this.workingCopy = getWorkingCopy("Reconciler15/src/test/X.java", "", owner, this.problemRequestor); |
2753 |
setWorkingCopyContents( |
2754 |
"package test;\n"+ |
2755 |
"public class X {\n"+ |
2756 |
" public void bar() {\n"+ |
2757 |
" new Y<String>().foo(\"\");\n" + |
2758 |
" }\n"+ |
2759 |
"}\n" |
2760 |
); |
2761 |
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, owner, null); |
2762 |
|
2763 |
assertProblems( |
2764 |
"Unexpected problems", |
2765 |
"----------\n" + |
2766 |
"----------\n" |
2767 |
); |
2768 |
} finally { |
2769 |
if (workingCopy1 != null) { |
2770 |
workingCopy1.discardWorkingCopy(); |
2771 |
} |
2772 |
} |
2773 |
} |
2774 |
/* |
2732 |
* Ensures that a working copy with a type with a dollar name can be reconciled without errors. |
2775 |
* Ensures that a working copy with a type with a dollar name can be reconciled without errors. |
2733 |
* (regression test for bug 117121 Can't create class called A$B in eclipse) |
2776 |
* (regression test for bug 117121 Can't create class called A$B in eclipse) |
2734 |
*/ |
2777 |
*/ |