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

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java (+18 lines)
Lines 89-94 Link Here
89
}
89
}
90
boolean areTypesEqual(TypeBinding one, TypeBinding two) {
90
boolean areTypesEqual(TypeBinding one, TypeBinding two) {
91
	if (one == two) return true;
91
	if (one == two) return true;
92
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=329584
93
	switch(one.kind()) {
94
		case Binding.TYPE:
95
			switch (two.kind()) {
96
				case Binding.PARAMETERIZED_TYPE:
97
				case Binding.RAW_TYPE:
98
					if (one == two.erasure())
99
						return true;
100
			}
101
			break;
102
		case Binding.RAW_TYPE:
103
		case Binding.PARAMETERIZED_TYPE:
104
			switch(two.kind()) {
105
				case Binding.TYPE:
106
					if (one.erasure() == two)
107
						return true;
108
			}
109
	}
92
110
93
	// need to consider X<?> and X<? extends Object> as the same 'type'
111
	// need to consider X<?> and X<? extends Object> as the same 'type'
94
	if (one.isParameterizedType() && two.isParameterizedType())
112
	if (one.isParameterizedType() && two.isParameterizedType())
(-)src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java (-1 / +1 lines)
Lines 11183-11189 Link Here
11183
		null);
11183
		null);
11184
}
11184
}
11185
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=329584 
11185
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=329584 
11186
public void _test329584() {
11186
public void test329584() {
11187
	Map compilerOptions15 = getCompilerOptions();
11187
	Map compilerOptions15 = getCompilerOptions();
11188
	compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, CompilerOptions.VERSION_1_5);
11188
	compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, CompilerOptions.VERSION_1_5);
11189
	compilerOptions15.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5);
11189
	compilerOptions15.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5);

Return to bug 329584