Closed
Description
Based on OpenCB failure in rssh/dotty-cps-async build logs
Since Scala 3.3.1-RC1 we define overloaded versions of defn.FunctionClass
which are marked as experimental. The previous method is going to be deprecated in 3.4. However, for the 3.3.x LTS line the source compatibilty is broken when using stable versions of the compiler or when using -Yno-experimental
flag.
Compiler version
Since 3.3.1-RC1
After merge of 9571b42
Minimized code
//> using options -Yno-experimental
import scala.quoted._
def repro(using Quotes): Unit = {
import quotes.reflect._
val works = defn.FunctionClass(42, isImplicit = false, isErased = false)
val fails = defn.FunctionClass(42)
}
Output
[error] ./main.scala:8:15
[error] method FunctionClass is marked @experimental and therefore may only be used in an experimental scope.
[error] val fails = defn.FunctionClass(42)
[error]
Expectation
Can we force typer to use non-experimental variant of overloaded function under no-experimental flag (or in stable release)?