Skip to content

Commit 9a87034

Browse files
committed
SI-5583 Remove the workaround for specialization bug
08505bd added a workaround for an undiagnosed interaction between resident compilation and specialzation. This is no longer needed after the previous commit.
1 parent 24a0777 commit 9a87034

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,20 +1499,13 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
14991499
val residualTargs = symbol.info.typeParams zip baseTargs collect {
15001500
case (tvar, targ) if !env.contains(tvar) || !isPrimitiveValueClass(env(tvar).typeSymbol) => targ
15011501
}
1502-
// See SI-5583. Don't know why it happens now if it didn't before.
1503-
if (specMember.info.typeParams.isEmpty && residualTargs.nonEmpty) {
1504-
devWarning("Type args to be applied, but symbol says no parameters: " + ((specMember.defString, residualTargs)))
1505-
baseTree
1506-
}
1507-
else {
1508-
ifDebug(assert(residualTargs.length == specMember.info.typeParams.length,
1509-
"residual: %s, tparams: %s, env: %s".format(residualTargs, specMember.info.typeParams, env))
1510-
)
1502+
ifDebug(assert(residualTargs.length == specMember.info.typeParams.length,
1503+
"residual: %s, tparams: %s, env: %s".format(residualTargs, specMember.info.typeParams, env))
1504+
)
15111505

1512-
val tree1 = gen.mkTypeApply(specTree, residualTargs)
1513-
debuglog("rewrote " + tree + " to " + tree1)
1514-
localTyper.typedOperator(atPos(tree.pos)(tree1)) // being polymorphic, it must be a method
1515-
}
1506+
val tree1 = gen.mkTypeApply(specTree, residualTargs)
1507+
debuglog("rewrote " + tree + " to " + tree1)
1508+
localTyper.typedOperator(atPos(tree.pos)(tree1)) // being polymorphic, it must be a method
15161509
}
15171510

15181511
curTree = tree

0 commit comments

Comments
 (0)