Single Abstract Method for SAMs cannot be polymorphic (original) (raw)
Grégoire Neuville gregoire.neuville at gmail.com
Tue Apr 2 13:04:32 PDT 2013
- Previous message: hg: lambda/lambda/jdk: 8007297: [pack200] allow opcodes with InterfaceMethodRefs
- Next message: Single Abstract Method for SAMs cannot be polymorphic
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all,
The below code :
public class TestGenericSAM {
class Gen {}
@FunctionalInterface interface CoArbitrary { abstract Gen coarbitrary(A a, Gen g); }
void test() { CoArbitrary<?> coArb = (a, g) -> new Gen<>(); } }
doesn't compile. I guess this is by design (the annotation alone is marked as erroneous by IntelliJ), but I'm just wondering why.
Thanks a lot for any explanation !
-- Grégoire Neuville
- Previous message: hg: lambda/lambda/jdk: 8007297: [pack200] allow opcodes with InterfaceMethodRefs
- Next message: Single Abstract Method for SAMs cannot be polymorphic
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]