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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java (-1 / +2 lines)
Lines 3896-3902 Link Here
3896
			for (int i = 0; i < argLength; i++) {
3896
			for (int i = 0; i < argLength; i++) {
3897
				TypeBinding param = parameters[i];
3897
				TypeBinding param = parameters[i];
3898
				TypeBinding arg = arguments[i];
3898
				TypeBinding arg = arguments[i];
3899
				if (arg != param && !arg.isCompatibleWith(param))
3899
				//https://bugs.eclipse.org/bugs/show_bug.cgi?id=330445
3900
				if (arg != param && !arg.isCompatibleWith(param.erasure()))
3900
					return NOT_COMPATIBLE;
3901
					return NOT_COMPATIBLE;
3901
			}
3902
			}
3902
			return COMPATIBLE;
3903
			return COMPATIBLE;
(-)src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java (+44 lines)
Lines 11272-11275 Link Here
11272
		compilerOptions14,
11272
		compilerOptions14,
11273
		null);
11273
		null);
11274
}
11274
}
11275
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=330445 
11276
public void test330445() {
11277
	Map compilerOptions15 = getCompilerOptions();
11278
	compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, CompilerOptions.VERSION_1_5);
11279
	compilerOptions15.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5);
11280
	compilerOptions15.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5);
11281
	this.runConformTest(
11282
		new String[] {
11283
			"Y.java",
11284
			"import java.util.Map;\n" + 
11285
			"public class Y {\n" + 
11286
			"	static void foo(Map<String, String> map) {\n" + 
11287
			"	}\n" + 
11288
			"}",
11289
		},
11290
		"",
11291
		null,
11292
		true,
11293
		null,
11294
		compilerOptions15,
11295
		null);
11296
	
11297
	Map compilerOptions14 = getCompilerOptions();
11298
	compilerOptions14.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_2);
11299
	compilerOptions14.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
11300
	compilerOptions14.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_3);
11301
	compilerOptions14.put(JavaCore.COMPILER_PB_UNNECESSARY_TYPE_CHECK, JavaCore.IGNORE);
11302
	this.runConformTest(
11303
		new String[] {
11304
			"X.java",
11305
			"import java.util.Properties;\n" + 
11306
			"public class X {\n" + 
11307
			"    static void bar(Object[] args) {\n" + 
11308
			"        Y.foo(new Properties());\n" + 
11309
			"    }\r\n" + 
11310
			"}",
11311
		},
11312
		"",
11313
		null,
11314
		false,
11315
		null,
11316
		compilerOptions14,
11317
		null);
11318
}
11275
}
11319
}

Return to bug 330445