| Summary: | [1.8][compiler]Incongruent Lambda Exception thrown | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Manoj N Palat <manoj.palat> | ||||||||||
| Component: | Core | Assignee: | ANIRBAN CHAKRABORTY <anchakrk> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | jarthana, srikanth_sankaran, stephan.herrmann | ||||||||||
| Version: | 4.4 | Flags: | srikanth_sankaran:
review+
srikanth_sankaran: review+ |
||||||||||
| Target Milestone: | BETA J8 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows 7 | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Manoj N Palat
Follow up of bug 412453 I am assuming that this was a user visible exception that aborted the compilation and was not just an internally swallowed exception. Please follow up. TIA. Please attach a small test case while the steps are still clear as to how to reproduce, Thanks (In reply to comment #2) > I am assuming that this was a user visible exception that aborted the > compilation and was not just an internally swallowed exception. > Yes. This is a user visible exception that aborted the build. Created attachment 233548 [details]
Small Test case reproducing the problem
Created attachment 233550 [details]
Same Testcase as a patch
Assigning to Anirban. Created attachment 234130 [details]
Patch for the fix
Patch for the fix
Smaller test case:
// ---
interface I {
String sam();
}
public class X {
static String foo(I i) { return ""; }
public static void main(String[] args) {
foo(() -> foo(X::getInt));
}
static Integer getInt() { return 0; }
}
Anirban, please see that there is a difference in the behavior between
the reference compiler and ECJ compiler on the regression test you are adding.
We should not codify wrong/suspect behavior this way as it will lead to
wasted cycles down stream.
So I suggest a two pronged strategy:
(1) Fix the current bug wrt to the new small test case.
(2) Raise a follow up bug and assign to Stephan as it likely involves
unfinished portions of type inference work.
Created attachment 234181 [details] patch for the fix accommodating the review comments patch for the fix accommodating the review comments. Filed Bug#414631 for the original testcase. This contribution complies with http://www.eclipse.org/legal/CoO.php No need to raise review requests multiple times. Patch looks good, Thanks Anirban. Jay can you please release and resolve - I am still trying to sort out why I am having issues with push. TIA. |