Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 405134 - [1.8][code assist + compiler] compiler and code assist problem in multilevel lambda with curly bracketed body
Summary: [1.8][code assist + compiler] compiler and code assist problem in multilevel ...
Status: RESOLVED FIXED
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: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 402079
  Show dependency tree
 
Reported: 2013-04-08 05:28 EDT by ANIRBAN CHAKRABORTY CLA
Modified: 2013-11-30 19:57 EST (History)
1 user (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-04-08 05:28:43 EDT
public interface Foo { 
	int run1(int s1, int s2);
	static int x2 = 0;
}

interface Foo1 {
	Foo run2(int argFoo1);
}

interface X extends Foo{
	
    static int x1 = 2;
    static Foo f = (x5, x6) -> x5;
    static Foo1 f1 = af1 -> (a1,b1) -> {int uniqueName = 4; return uniqueName;};
    		
}

eclipse compiler clean, reference commandline compiler crash and seemingly total breakdown of code-assist inside the curly braces in the above multilevel lambda.

Thanks
Anirban
Comment 1 Srikanth Sankaran CLA 2013-11-30 08:45:41 EST
Code assist works fine in this example having been fixed by other recent
resolved bugzilla(s). However I noticed that this test case triggers an
NPE if the semicolon in the return statement is removed. 

Fix and tests for that problem released here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=31f5d8c3352dfd40743cbafcdc19d9f5e7640d54