-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:desugarDesugaring happens after parsing but before typing, see desugar.scalaDesugaring happens after parsing but before typing, see desugar.scalaitype:performance
Milestone
Description
Compiler version
3.2.1 and before
Minimized code
import scala.language.dynamics
object Foo extends Dynamic {
def applyDynamic(name: String)(): Foo.type = this
}
object Test {
def test() = {
Foo
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
.xxx()
}
}Output
This compiles successfully but the compilation time starts to rapidly grow (nonlinearly?) starting from some number of chained invocations desugared to applyDynamic. This happens also for applyDynamicNamed.
Expectation
In scala 2.13 this compiles almost instantly so compilation times should not explode in scala 3 either
Metadata
Metadata
Assignees
Labels
area:desugarDesugaring happens after parsing but before typing, see desugar.scalaDesugaring happens after parsing but before typing, see desugar.scalaitype:performance