Summary: | [1.5][compiler] Assignment using inferred type should be rejected | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Philipe Mulet <philippe_mulet> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | nbeyer |
Version: | 3.2 | ||
Target Milestone: | 3.2.1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Philipe Mulet
2006-06-01 09:23:48 EDT
Actually, I believe the code is valid. Inference is performing in 2 passes. 1st pass is inferring from argument types, which is going to bind E to Integer. Since T is still unbound, it will consider extra constraints: 1. expectation from return type as invocation is rhs of assignment: Iterator<T> <: Iterator<Number> 2. expectation from type parameter declared bounds T :> Integer These should yield: T == Number, as this is the only one satisfying both constraints Added GenericTypeTest#test0999&1000 *** Bug 145420 has been marked as a duplicate of this bug. *** |