Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 399534 - [1.8][compiler] Lambda parameters must be checked for compatibility with the single abstract method of the functional interface
Summary: [1.8][compiler] Lambda parameters must be checked for compatibility with the ...
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: 382701
  Show dependency tree
 
Reported: 2013-01-30 13:48 EST by Srikanth Sankaran CLA
Modified: 2013-02-05 04:12 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 Srikanth Sankaran CLA 2013-01-30 13:48:23 EST
BETA_JAVA8:

The following program should report an error, but presently doesn't:

// ---
interface I { void run(int x); }

class X {
	void foo() {
	    I r = (String y) -> {};
        }
}
Comment 1 Srikanth Sankaran CLA 2013-01-30 14:08:17 EST
Hint: Synthesize a method binding for the anonymous method, tag it as
anonymous and use MethodVerifier.doesMethodOverride
Comment 2 Srikanth Sankaran CLA 2013-02-01 07:08:11 EST
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=382701#c41
Comment 4 Srikanth Sankaran CLA 2013-02-01 08:11:41 EST
Jesper, since you already have some code in place for this and you have the
citation ready chapter and verse, this is yours :)
Comment 5 Srikanth Sankaran CLA 2013-02-05 04:12:52 EST
Most of the fix was already in place (https://bugs.eclipse.org/bugs/show_bug.cgi?id=382701#c47).

Added tests and some tweaks and released via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=e78b831ecdf23a867bd21d96aa870a039cfa4f4c