View | Details | Raw Unified | Return to bug 181270 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java (-2 / +38 lines)
Lines 33-39 Link Here
33
	// All specified tests which does not belong to the class are skipped...
33
	// All specified tests which does not belong to the class are skipped...
34
	static {
34
	static {
35
//		TESTS_NAMES = new String[] { "test0788" };
35
//		TESTS_NAMES = new String[] { "test0788" };
36
//		TESTS_NUMBERS = new int[] { 1105 };
36
//		TESTS_NUMBERS = new int[] { 1121, 1122 };
37
//		TESTS_RANGE = new int[] { 1097, -1 };
37
//		TESTS_RANGE = new int[] { 1097, -1 };
38
	}
38
	}
39
	public static Test suite() {
39
	public static Test suite() {
Lines 37238-37243 Link Here
37238
		"	<Zork>this();\n" + 
37238
		"	<Zork>this();\n" + 
37239
		"	      ^^^^^^^\n" + 
37239
		"	      ^^^^^^^\n" + 
37240
		"Constructor call must be the first statement in a constructor\n" + 
37240
		"Constructor call must be the first statement in a constructor\n" + 
37241
		"----------\n");		
37241
		"----------\n");
37242
}
37243
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=181270
37244
public void test1121() {
37245
	this.runNegativeTest(
37246
		new String[] {
37247
			"X.java",
37248
			"public class X<T> {\n" + 
37249
			"	void foo() {\r\n" + 
37250
			"		System.out.println(T[].class);\n" + 
37251
			"	}\n" + 
37252
			"}", // =================
37253
		},
37254
		"----------\n" + 
37255
		"1. ERROR in X.java (at line 3)\n" + 
37256
		"	System.out.println(T[].class);\n" + 
37257
		"	                   ^^^^^^^^^\n" + 
37258
		"Illegal class literal for the type parameter T\n" + 
37259
		"----------\n");
37260
}
37261
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=181270
37262
public void test1122() {
37263
	this.runNegativeTest(
37264
		new String[] {
37265
			"X.java",
37266
			"public class X {\n" + 
37267
			"	<T> void foo() {\r\n" + 
37268
			"		System.out.println(T[].class);\n" + 
37269
			"	}\n" + 
37270
			"}", // =================
37271
		},
37272
		"----------\n" + 
37273
		"1. ERROR in X.java (at line 3)\n" + 
37274
		"	System.out.println(T[].class);\n" + 
37275
		"	                   ^^^^^^^^^\n" + 
37276
		"Illegal class literal for the type parameter T\n" + 
37277
		"----------\n");
37242
}
37278
}
37243
}
37279
}

Return to bug 181270