Bug 179902 - [1.5][compiler] javac "Bound mismatch" on generics construct javac (1.5 and 1.6) is happy with
Summary: [1.5][compiler] javac "Bound mismatch" on generics construct javac (1.5 and 1...
Status: VERIFIED DUPLICATE of bug 202404
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.3.2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-28 23:43 EDT by Zorzella Mising name CLA
Modified: 2008-01-24 07:08 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zorzella Mising name CLA 2007-03-28 23:43:09 EDT
Build ID: I20070323-1616

Steps To Reproduce:
This excerpt:

class Foo<F extends Enum<F>> {
  
  class Bar<B> {
    Bar(Foo<? extends B> bar) {}
  }
}

Yields this error, even though javac (1.6 and 1.5) is happy:

Bound mismatch: The type ? extends B is not a valid substitute for the bounded parameter <F extends Enum<F>> of the type Foo<F>
Comment 1 Kent Johnson CLA 2007-06-08 13:43:59 EDT
I don't see why B should be a valid substitue for Enum<F>, since B does not have any bounds that would match an Enum.

How did you instantiate Foo.Bar ?
Comment 2 Philipe Mulet CLA 2007-09-13 18:42:17 EDT
Fixed along with bug 202404.
Added GenericTypeTest#test1167

*** This bug has been marked as a duplicate of bug 202404 ***
Comment 3 David Audel CLA 2007-09-18 06:28:59 EDT
Verified for 3.4M2 using build I20070918-0010
Comment 4 Frederic Fusier CLA 2008-01-24 07:08:45 EST
Verified for 3.3.2 using build M20080123-0800.