Bug 107681

Summary: [1.5][compiler] invalid ambiguous invocation diagnostic
Product: [Eclipse Project] JDT Reporter: Tim Hanson <thanson>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tim Hanson CLA 2005-08-22 19:46:56 EDT
The 3.1 compiler complains about the invocation of erasure claiming the
invocation is ambiguous. This isn't possible since the method must be an override.

import java.lang.reflect.Type;

interface Navigator<TypeT> {
	<T> TypeT erasure(TypeT x);
}

class ReflectionNavigator implements Navigator<Type> {
	public <T> Class<T> erasure(Type t) { return null; }
}

class Usage {
	public void foo(ReflectionNavigator r, Type t) {
		r.erasure(t);
	}
}
Comment 1 Kent Johnson CLA 2005-09-19 13:27:31 EDT
fixed & released in 3.1.1 stream
Comment 2 Kent Johnson CLA 2005-09-19 13:31:42 EDT
Added MethodVerify test068
Comment 3 Kent Johnson CLA 2005-09-19 14:54:21 EDT
released in 3.2 HEAD stream
Comment 4 Maxime Daniel CLA 2005-09-21 10:24:45 EDT
Verified for 3.2 M2 with build I20050920-0010.
Comment 5 Olivier Thomann CLA 2005-09-26 11:10:39 EDT
Verified for 3.1.1 using M20050923-1430.