Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 414631 - [1.8][compiler] Eclipse compiler giving error while javac is running clean
Summary: [1.8][compiler] Eclipse compiler giving error while javac is running clean
Status: RESOLVED DUPLICATE of bug 400874
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: BETA J8   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-08 03:00 EDT by ANIRBAN CHAKRABORTY CLA
Modified: 2013-12-12 17:52 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ANIRBAN CHAKRABORTY CLA 2013-08-08 03:00:21 EDT
The following testcase is running clean in javac, while type incompatibility error is reported in eclipse jdt

X.java [
package test;
import static test.Y.*;
public class X  {
  public void foo() {
    Y<String> generated = cons("a", () -> cons("b", Y::<String>empty));
  }
}

]
Y.java [
package test;
import java.util.function.Supplier;
public abstract class Y<E>  {
  public static <E> Y<E> empty() { return null;}
  public static <E> Y<E> cons(E head, Supplier<Y<E>> tailFun) {return null;}
}

]


Source : Bug 412650 (Testcase uploaded by Manoj)
Comment 1 Srikanth Sankaran CLA 2013-08-08 05:47:25 EDT
This can be worked on only after the fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=412650 is released.
Comment 2 Stephan Herrmann CLA 2013-08-08 06:05:55 EDT
(In reply to comment #1)
> This can be worked on only after the fix for
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=412650 is released.

Thanks, and if it is indeed a problem requiring the new type inference, it needs
a spec for the new type inference that is complete by any measure ...
Comment 3 Stephan Herrmann CLA 2013-12-12 17:52:42 EST
Resolved in the feature branch of bug 400874  via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=sherrmann/NewTypeInference&id=3aca47e5665504fbb162bd24e18ea6071e58fec4

See also bug 400874 comment 68

*** This bug has been marked as a duplicate of bug 400874 ***