Skip to content

Regression in rssh/dotty-cps-async - overload of experimental method #18414

Closed
@WojciechMazur

Description

@WojciechMazur

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)?

Metadata

Metadata

Assignees

Labels

area:experimentalarea:typeritype:bugregressionThis worked in a previous version but doesn't anymoresource-incompatibilityFixing a bug caused some erronous code to stop compiling. Should be mentioned in the release notes.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions