Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 412650

Summary: [1.8][compiler]Incongruent Lambda Exception thrown
Product: [Eclipse Project] JDT Reporter: Manoj N Palat <manoj.palat>
Component: CoreAssignee: ANIRBAN CHAKRABORTY <anchakrk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, srikanth_sankaran, stephan.herrmann
Version: 4.4Flags: srikanth_sankaran: review+
srikanth_sankaran: review+
Target Milestone: BETA J8   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Small Test case reproducing the problem
none
Same Testcase as a patch
none
Patch for the fix
none
patch for the fix accommodating the review comments anchakrk: review?

Description Manoj N Palat CLA 2013-07-10 04:47:43 EDT
While compiling the Project mentioned in bug 412453 description. Will extract a small test case soon.
Comment 1 Manoj N Palat CLA 2013-07-10 04:48:15 EDT
Follow up of bug 412453
Comment 2 Srikanth Sankaran CLA 2013-07-10 05:22:32 EDT
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.
Comment 3 Srikanth Sankaran CLA 2013-07-16 02:24:39 EDT
Please attach a small test case while the steps are still clear as to
how to reproduce, Thanks
Comment 4 Manoj N Palat CLA 2013-07-16 23:29:33 EDT
(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.
Comment 5 Manoj N Palat CLA 2013-07-17 05:35:39 EDT
Created attachment 233548 [details]
Small Test case reproducing the problem
Comment 6 Manoj N Palat CLA 2013-07-17 05:39:19 EDT
Created attachment 233550 [details]
Same Testcase as a patch
Comment 7 Srikanth Sankaran CLA 2013-07-29 02:52:28 EDT
Assigning to Anirban.
Comment 8 ANIRBAN CHAKRABORTY CLA 2013-08-06 14:47:05 EDT
Created attachment 234130 [details]
Patch for the fix

Patch for the fix
Comment 9 Srikanth Sankaran CLA 2013-08-07 05:26:49 EDT
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.
Comment 10 ANIRBAN CHAKRABORTY CLA 2013-08-08 03:06:19 EDT
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.
Comment 11 ANIRBAN CHAKRABORTY CLA 2013-08-08 06:39:51 EDT
This contribution complies with http://www.eclipse.org/legal/CoO.php
Comment 12 Srikanth Sankaran CLA 2013-08-12 06:51:30 EDT
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.