Bug 107681 - [1.5][compiler] invalid ambiguous invocation diagnostic
Summary: [1.5][compiler] invalid ambiguous invocation diagnostic
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-22 19:46 EDT by Tim Hanson CLA
Modified: 2005-09-26 11:10 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.