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

Bug 518325

Summary: [1.8][compiler] Incorrect FunctionalInterface detection when extending multiple interfaces
Product: [Eclipse Project] JDT Reporter: Christophe Creeten <christophecreeten>
Component: CoreAssignee: Stephan Herrmann <stephan.herrmann>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: christophecreeten, stephan.herrmann
Version: 4.6   
Target Milestone: 4.7 M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Sample code reproducing the problem none

Description Christophe Creeten CLA 2017-06-15 12:54:23 EDT
Created attachment 268928 [details]
Sample code reproducing the problem

I have added an attachment containing a simple example which reproduces the bug. The Eclipse compiler does not allow me to declare C as a functional interface. Implementing C as an anonymous class at the executeBar method call site solves the problem. If I do, I only have to implement a single method, so I would expect it to be an instance of a functional interface. It all works fine when compiling with javac.

I am using Eclipse with:
Version: Neon.3 Release (4.6.3)
Build id: 20170314-1500
Comment 1 Stephan Herrmann CLA 2017-06-15 13:00:40 EDT
This has been fixed in 4.7 M7.

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