-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:initializationitype:bugprio:blockerregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore
Description
Based on the user report https://contributors.scala-lang.org/t/scala-3-8-0-release-thread/7291/17 in ichoran/kse3 project
Compiler version
3.8.0-RC2
Last good release: 3.8.0-RC1-bin-20250817-8c3f1a6-NIGHTLY
First bad release: 3.8.0-RC1-bin-20250818-aaa39c5-NIGHTLY
Bisect points to aaa39c5 (most likely unrelated)
Minimized code
trait Con[-T] extends (T => Unit):
def apply(t: T): Unit
@main def Test =
val c: Con[Int] = i => println(i)
c(2)Output
Compiled project (Scala 3.8.1-RC1-bin-20251128-fe49539-NIGHTLY, JVM (21))
Exception in thread "main" java.lang.BootstrapMethodError: bootstrap method initialization exception
at java.base/java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:188)
at java.base/java.lang.invoke.CallSite.makeSite(CallSite.java:316)
at java.base/java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:274)
at java.base/java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:264)
at test$package$.Test(test.scala:5)
at Test.main(test.scala:4)
Caused by: java.lang.invoke.LambdaConversionException: Type mismatch for lambda expected return: void is not convertible to class java.lang.Object
at java.base/java.lang.invoke.AbstractValidatingLambdaMetafactory.checkDescriptor(AbstractValidatingLambdaMetafactory.java:336)
at java.base/java.lang.invoke.AbstractValidatingLambdaMetafactory.validateMetafactoryArgs(AbstractValidatingLambdaMetafactory.java:315)
at java.base/java.lang.invoke.LambdaMetafactory.altMetafactory(LambdaMetafactory.java:535)
at java.base/java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:147)
... 5 moreExpectation
Should execute successfully
Metadata
Metadata
Assignees
Labels
area:initializationitype:bugprio:blockerregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore