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

(-)src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java (+33 lines)
Lines 38260-38263 Link Here
38260
		"The method compound(Iterable<? extends Comparator<? super U>>) in the type X is not applicable for the arguments (List<Comparator<?>>)\n" + 
38260
		"The method compound(Iterable<? extends Comparator<? super U>>) in the type X is not applicable for the arguments (List<Comparator<?>>)\n" + 
38261
		"----------\n");
38261
		"----------\n");
38262
}
38262
}
38263
public void test1149() {
38264
	this.runConformTest(
38265
		new String[] {
38266
			"A.java",
38267
			"public class A {\n" + 
38268
			"    <T extends Throwable> A() throws T {}\n" + 
38269
			"    void a() throws ClassNotFoundException {\n" + 
38270
			"	    new<ClassNotFoundException> A();\n" + 
38271
			"    }\n" + 
38272
			"}\n",
38273
			"B.java",
38274
			"public class B {\n" + 
38275
			"    	void b() throws ClassNotFoundException {\n" + 
38276
			"	    new<ClassNotFoundException> A();\n" + 
38277
			"    }\n" + 
38278
			"}\n"
38279
		},
38280
		""
38281
	);
38282
	this.runConformTest(
38283
		new String[] {
38284
			"B.java",
38285
			"public class B {\n" + 
38286
			"    	void b() throws ClassNotFoundException {\n" + 
38287
			"	    new<ClassNotFoundException> A();\n" + 
38288
			"    }\n" + 
38289
			"}\n"
38290
		},
38291
		"",
38292
		null,
38293
		false, // do not flush output
38294
		null);		
38295
}
38263
}
38296
}
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java (-3 / +3 lines)
Lines 471-481 Link Here
471
			}
471
			}
472
		}
472
		}
473
473
474
		if (!method.isConstructor())
474
		// always retrieve return type (for constructors, its V for void - will be ignored)
475
			returnType = environment.getTypeFromTypeSignature(wrapper, typeVars, this);
475
		returnType = environment.getTypeFromTypeSignature(wrapper, typeVars, this);
476
476
477
		if (!wrapper.atEnd() && wrapper.signature[wrapper.start] == '^') {
477
		if (!wrapper.atEnd() && wrapper.signature[wrapper.start] == '^') {
478
			// attempt to find each superinterface if it exists in the cache (otherwise - resolve it when requested)
478
			// attempt to find each exception if it exists in the cache (otherwise - resolve it when requested)
479
			java.util.ArrayList types = new java.util.ArrayList(2);
479
			java.util.ArrayList types = new java.util.ArrayList(2);
480
			do {
480
			do {
481
				wrapper.start++; // skip '^'
481
				wrapper.start++; // skip '^'

Return to bug 198051