Bug 188741 - [1.5][compiler] Incorrect ambiguous method error with inherited raw type
Summary: [1.5][compiler] Incorrect ambiguous method error with inherited raw type
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.3 RC2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-23 15:32 EDT by Kent Johnson CLA
Modified: 2007-05-25 06:37 EDT (History)
0 users

See Also:
philippe_mulet: review+
maxime_daniel: review+


Attachments
Proposed patch (2.52 KB, patch)
2007-05-23 15:34 EDT, Kent Johnson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Johnson CLA 2007-05-23 15:32:26 EDT
This is a copy from https://bugs.eclipse.org/bugs/show_bug.cgi?id=186382#c7

class X extends java.util.ArrayList {
  private static final long serialVersionUID = 1L;
  public void add(Comparable o) {}
  public void test() { add(\"hello\"); }
}
Comment 1 Kent Johnson CLA 2007-05-23 15:34:47 EDT
Created attachment 68431 [details]
Proposed patch
Comment 2 Kent Johnson CLA 2007-05-23 15:35:41 EDT
Would like to release for 3.3 RC2
Comment 3 Philipe Mulet CLA 2007-05-23 16:30:14 EDT
Looks good. You need one more reviewer.
Comment 4 Maxime Daniel CLA 2007-05-24 03:13:37 EDT
Verifier, the issue is that the code sample above should not raise any error, which it did before the fix.

Patch looks good.

(BTW, I checked that we still need to single out the oneParam == twoParam case; failure to do so results into broken AmbiguousMethodTest#11a, 11b and 14h.)
Comment 5 Kent Johnson CLA 2007-05-24 10:29:04 EDT
Released into HEAD for 3.3RC2
Comment 6 Eric Jodet CLA 2007-05-25 04:59:00 EDT
(In reply to comment #0)
correct test case should read:

class X extends java.util.ArrayList {
  private static final long serialVersionUID = 1L;
  public void add(Comparable o) {}
  public void test() { add("hello"); }
}

(not \"hello\")
Comment 7 Eric Jodet CLA 2007-05-25 04:59:38 EDT
Verified for 3.3 RC2 using build I20070525-0010