Bug 271969 - inconsistency with javac -- static methods + overloading + generic
Summary: inconsistency with javac -- static methods + overloading + generic
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-12 18:18 EDT by Tom Huybrechts CLA
Modified: 2009-04-28 09:42 EDT (History)
2 users (show)

See Also:


Attachments
project (6.84 KB, application/x-zip-compressed)
2009-04-12 18:18 EDT, Tom Huybrechts CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Huybrechts CLA 2009-04-12 18:18:00 EDT
Created attachment 131589 [details]
project

The code for Hudson (https://hudson.dev.java.net) compiles with javac, but not with JDT. 

The problem is a method like this:
   public static <T> ExtensionList<T> create(Hudson hudson, Class<T> type)
that exists in a class and its subclass.

When a third class refers to both methods, the reference to the static method in the subclass causes a compile error:

The method create(Hudson, Class) is ambiguous for the type  DescriptorExtensionList	

I added the minimal code to reproduce this problem in an attachment.
Comment 1 Kent Johnson CLA 2009-04-13 12:46:43 EDT
Reproduced with 3.4.2

But it works fine with the 3.5M6 build
Comment 2 Kent Johnson CLA 2009-04-13 12:47:18 EDT
Tom - please try your complete project with the 3.5M6 build and reopen this bug if it fails for you.

thx
Comment 3 Tom Huybrechts CLA 2009-04-18 16:45:11 EDT
Confirmed that this works for the full project too with 3.5M6
Comment 4 Jay Arthanareeswaran CLA 2009-04-28 09:38:57 EDT
Verified by the Reporter