Skip to content

Regression with LambdaConversionException #14135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jamesward opened this issue Dec 18, 2021 · 1 comment
Closed

Regression with LambdaConversionException #14135

jamesward opened this issue Dec 18, 2021 · 1 comment

Comments

@jamesward
Copy link

Compiler version

3.1.0

Minimized code

https://github.com/jamesward/hello-zio-http/tree/collectM

Output

When running:

./sbt run

And then making an http request to localhost:8080, I get:

An unchecked error was produced.
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 zhttp.service.HttpRuntime.unsafeRun$$anonfun$4$$anonfun$2$$anonfun$2(HttpRuntime.scala:24)
	at zio.ZIO$.effectTotal$$anonfun$1(ZIO.scala:2868)
	at zio.internal.FiberContext.evaluateNow(FiberContext.scala:350)
	at zio.internal.FiberContext.evaluateLater$$anonfun$1(FiberContext.scala:787)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.invoke.LambdaConversionException: Type mismatch for instantiated parameter 0: class java.lang.Object is not a subtype of interface io.netty.util.concurrent.Future
	at java.base/java.lang.invoke.AbstractValidatingLambdaMetafactory.checkDescriptor(AbstractValidatingLambdaMetafactory.java:308)
	at java.base/java.lang.invoke.AbstractValidatingLambdaMetafactory.validateMetafactoryArgs(AbstractValidatingLambdaMetafactory.java:294)
	at java.base/java.lang.invoke.LambdaMetafactory.altMetafactory(LambdaMetafactory.java:503)
	at java.base/java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:138)
	... 10 more

Expectation

No error.

This might be a regression:
#9769

@jamesward
Copy link
Author

Note sure why my searches didn't find this, but it looks like this is a bug in zio-http:
zio/zio-http#655

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant