Skip to content

Commit a943064

Browse files
committed
Disable specialization for Scala.js
1 parent 9f02e81 commit a943064

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ class SpecializeFunctions extends MiniPhase with InfoTransformer {
1616
val phaseName = "specializeFunctions"
1717
override def runsAfter = Set(ElimByName.name)
1818

19+
override def isEnabled(using Context): Boolean =
20+
!ctx.settings.scalajs.value
21+
1922
override def infoMayChange(sym: Symbol)(using Context): Boolean =
2023
!sym.is(Flags.Package) && sym.isDefinedInCurrentRun
2124

compiler/src/dotty/tools/dotc/transform/SpecializedApplyMethods.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ class SpecializedApplyMethods extends MiniPhase with InfoTransformer {
2222

2323
val phaseName = "specializedApplyMethods"
2424

25+
override def isEnabled(using Context): Boolean =
26+
!ctx.settings.scalajs.value
27+
2528
private def specApplySymbol(sym: Symbol, args: List[Type], ret: Type)(using Context): Symbol = {
2629
val name = nme.apply.specializedFunction(ret, args)
2730
// Create the symbol at the next phase, so that it is a valid member of the

0 commit comments

Comments
 (0)