| Summary: | [1.7][compiler] Suspect bounds check failure after inference. | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Srikanth Sankaran <srikanth_sankaran> | ||||||||||
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> | ||||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | Olivier_Thomann, satyam.kandula | ||||||||||
| Version: | 3.7 | Flags: | Olivier_Thomann:
review+
|
||||||||||
| Target Milestone: | 3.7.1 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows XP | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
I'll investigate this one. Released org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest._test347600() as a disabled junit test. Created attachment 197063 [details]
Patch & test under consideration
Comment on attachment 197063 [details]
Patch & test under consideration
Close, but no cigar.
Created attachment 197121 [details]
Patch & test under consideration
Created attachment 197203 [details]
Patch & test under consideration
Earlier patch did not terminate recursion properly leading to
some failures in GenericTypeTests.java.
New patch is under test.
Created attachment 197216 [details]
Patch & test under consideration
Same patch - cleaned up quite a bit and better commented.
Passes all tests. Released in BETA_JAVA7 branch. Olivier, please review, TIA.
Rather than reviewing the patch, it would be better to just compare:
(1) ParameterizedGenericMethodBinding.java versions 1.70.2.5 with 1.70
(2) Scope.java versions 1.380.2.9 with 1.380.2.8
This contains the cumulative fixes for
https://bugs.eclipse.org/bugs/show_bug.cgi?id=242159
https://bugs.eclipse.org/bugs/show_bug.cgi?id=341795
https://bugs.eclipse.org/bugs/show_bug.cgi?id=347600
https://bugs.eclipse.org/bugs/show_bug.cgi?id=347145
https://bugs.eclipse.org/bugs/show_bug.cgi?id=347746
This will be lot simpler than reviewing the patches attached to
each of them.
Looks good. I'll take more time to be more familiar with the specification part you are referring in your comments. Verified using Eclipse Java 7 Support(Beta) feature patch v20110623-0900. |
The following program compiles fine with JDK 7b142, but fails to compile with eclipse HEAD and BETA_JAVA7 class A {} class B<V> extends A {} class D extends B<E> {} class E extends B<D> {} public class X<T, Y extends B<U>, U extends B<Y>> { public static <T1, Y1 extends B<U1>, U1 extends B<Y1>> X<T1, Y1, U1> getX() { return null; } X<B, ? extends D, ? extends E> f = getX(); } We report: Bound mismatch: The generic method getX() of type X<T,Y,U> is not applicable for the arguments (). The inferred type D&B<E&B<Y1>> is not a valid substitute for the bounded parameter <Y1 extends B<U1>> I wonder if this is not another lingering type variable issue.