| Summary: | [1.8] Correct super() invocation is not inferred when argument is a conditional expression | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Jay Arthanareeswaran <jarthana> |
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | manoj.palat, srikanth_sankaran |
| Version: | 4.4 | ||
| Target Milestone: | BETA J8 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 427787 | ||
Are you sure this is the correct fragment ? Or perhaps your workspace does not have all the changes ? I can believe this problem existed last week, as of now this code compiles fine and the overloaded call is resolved fine. Released test (passes) OverloadResolutionTest8.test427808() Jay, thanks for double checking and closing if an operator error or posting the right snippet. Earlier observation based on workspace with HEAD sources. I also checked it is not reproducible with Eclipse Java Development Tools Patch for Java 8 Support (BETA) 1.0.0.v20140210-0105_BETA_JAVA8 org.eclipse.jdt.java8patch.feature.group Eclipse.org Sorry, I was using a week old update bits. After updating jdt, I no longer see the error. Verified as working for Eclipse + Java 8 RC1 using Kepler SR2(RC4) + Eclipse Java Development Tools Patch for Java 8 Support (BETA) 1.0.0.v20140220-2054 |
This code is rejected by ECJ, but allowed by Javac: public class X extends Foo { public X(I i) { super(i != null ? i.toString() : null); } } class Foo implements I { Foo(I i) {} Foo(String string){} } interface I {}