-
Bug
-
Resolution: Fixed
-
P3
-
11.0.1
-
b23
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8249194 | 11.0.9-oracle | Vicente Arturo Romero Zaldivar | P3 | Resolved | Fixed | b01 |
JDK-8249758 | 11.0.9 | Vicente Arturo Romero Zaldivar | P3 | Resolved | Fixed | b01 |
```
import java.util.Arrays;
import java.util.List;
abstract class A {}
interface B {
boolean g();
}
class C extends A implements B {
public boolean g() {
return true;
}
}
class D<R extends A & B> {
public long f(List<? extends R> xs) {
return xs.stream().filter(B::g).count();
}
public static void main(String[] args) {
long count = new D<C>().f(Arrays.asList(new C()));
System.err.println(count);
}
}
```
```
$ javac -fullversion
javac full version "11.0.1+13"
$ java D
Exception in thread "main" java.lang.BootstrapMethodError: bootstrap method initialization exception
at java.base/java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:194)
at java.base/java.lang.invoke.CallSite.makeSite(CallSite.java:307)
at java.base/java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:258)
at java.base/java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:248)
at D.f(T.java:18)
at D.main(T.java:22)
Caused by: java.lang.invoke.LambdaConversionException: Invalid receiver type class A; not a subtype of implementation type interface B
at java.base/java.lang.invoke.AbstractValidatingLambdaMetafactory.validateMetafactoryArgs(AbstractValidatingLambdaMetafactory.java:254)
at java.base/java.lang.invoke.LambdaMetafactory.metafactory(LambdaMetafactory.java:328)
at java.base/java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:127)
... 5 more
```
- backported by
-
JDK-8249194 LambdaConversionException: Invalid receiver type not a subtype of implementation type interface
-
- Resolved
-
-
JDK-8249758 LambdaConversionException: Invalid receiver type not a subtype of implementation type interface
-
- Resolved
-
- relates to
-
JDK-8207320 Wrong type order for intersection lambdas with multiple abstract methods
-
- Resolved
-
-
JDK-8269983 BootstrapMethodError with method reference and intersection type
-
- Resolved
-
-
JDK-8191655 LambdaConversionException: Invalid receiver type interface; not a subtype of implementation type interface
-
- Resolved
-
-
JDK-8023558 Javac creates invalid bootstrap methods for complex lambda/methodref case
-
- Closed
-