View | Details | Raw Unified | Return to bug 186833
Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java (-4 / +15 lines)
Lines 32767-32773 Link Here
32767
	);
32767
	);
32768
}
32768
}
32769
public void test1021b() { // should this case be allowed?
32769
public void test1021b() { // should this case be allowed?
32770
	this.runConformTest(
32770
	this.runNegativeTest(
32771
		new String[] {
32771
		new String[] {
32772
			"p/SomeClass2.java",
32772
			"p/SomeClass2.java",
32773
			"package p;\n" + 
32773
			"package p;\n" + 
Lines 32780-32786 Link Here
32780
			"	}\n" + 
32780
			"	}\n" + 
32781
			"}\n",
32781
			"}\n",
32782
		},
32782
		},
32783
		""
32783
		"----------\n" + 
32784
		"1. ERROR in p\\SomeClass2.java (at line 3)\n" + 
32785
		"	public abstract class SomeClass2<T> extends M {\n" + 
32786
		"	                                            ^\n" + 
32787
		"Cycle detected: the type SomeClass2<T> cannot extend/implement itself or one of its own member types\n" + 
32788
		"----------\n"
32784
	);
32789
	);
32785
}
32790
}
32786
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=151410 (duplicate of 149376)
32791
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=151410 (duplicate of 149376)
Lines 37936-37942 Link Here
37936
}
37941
}
37937
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=186833
37942
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=186833
37938
public void test1139() {
37943
public void test1139() {
37939
	this.runConformTest(
37944
	this.runNegativeTest(
37940
		new String[] {
37945
		new String[] {
37941
			"p/X.java",
37946
			"p/X.java",
37942
			"package p;\n" + 
37947
			"package p;\n" + 
Lines 37952-37958 Link Here
37952
			"	}\n" + 
37957
			"	}\n" + 
37953
			"}", // =================
37958
			"}", // =================
37954
		},
37959
		},
37955
		"");
37960
		"----------\n" + 
37961
		"1. ERROR in p\\X.java (at line 9)\r\n" + 
37962
		"	public class X extends Super<A<X>> {\r\n" + 
37963
		"	                       ^^^^^\n" + 
37964
		"Cycle detected: the type X cannot extend/implement itself or one of its own member types\n" + 
37965
		"----------\n"
37966
	);
37956
}
37967
}
37957
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=186788
37968
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=186788
37958
public void test1140() {
37969
public void test1140() {
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java (-12 / +11 lines)
Lines 1029-1046 Link Here
1029
			return true;
1029
			return true;
1030
		}
1030
		}
1031
1031
1032
// No longer believe this code is necessary, since we changed supertype lookup to use TypeReference resolution
1032
		if (superType.isMemberType()) {
1033
//		if (superType.isMemberType()) {
1033
			ReferenceBinding current = superType.enclosingType();
1034
//			ReferenceBinding current = superType.enclosingType();
1034
			do {
1035
//			do {
1035
				if (current.isHierarchyBeingConnected() && current == sourceType) {
1036
//				if (current.isHierarchyBeingConnected()) {
1036
					problemReporter().hierarchyCircularity(sourceType, current, reference);
1037
//					problemReporter().hierarchyCircularity(sourceType, current, reference);
1037
					sourceType.tagBits |= TagBits.HierarchyHasProblems;
1038
//					sourceType.tagBits |= TagBits.HierarchyHasProblems;
1038
					current.tagBits |= TagBits.HierarchyHasProblems;
1039
//					current.tagBits |= TagBits.HierarchyHasProblems;
1039
					return true;
1040
//					return true;
1040
				}
1041
//				}
1041
			} while ((current = current.enclosingType()) != null);
1042
//			} while ((current = current.enclosingType()) != null);
1042
		}
1043
//		}
1044
1043
1045
		if (superType.isBinaryBinding()) {
1044
		if (superType.isBinaryBinding()) {
1046
			// force its superclass & superinterfaces to be found... 2 possibilities exist - the source type is included in the hierarchy of:
1045
			// force its superclass & superinterfaces to be found... 2 possibilities exist - the source type is included in the hierarchy of:

Return to bug 186833