Skip to content

Commit 417fc96

Browse files
committed
Cast return value of specializedFor to TermName
1 parent 1cc3c83 commit 417fc96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dotty/tools/dotc/transform/TypeSpecializer.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import dotty.tools.dotc.ast.{tpd, TreeTypeMap}
44
import dotty.tools.dotc.ast.Trees._
55
import dotty.tools.dotc.core.Contexts.Context
66
import dotty.tools.dotc.core.DenotTransformers.InfoTransformer
7+
import dotty.tools.dotc.core.Names.TermName
78
import dotty.tools.dotc.core.Symbols.Symbol
89
import dotty.tools.dotc.core.{NameOps, Symbols, Flags}
910
import dotty.tools.dotc.core.Types._
@@ -163,7 +164,8 @@ class TypeSpecializer extends MiniPhaseTransform with InfoTransformer {
163164
val newSym = ctx.newSymbol(
164165
decl.owner,
165166
NameOps.NameDecorator(decl.name)
166-
.specializedFor(Nil, Nil, instanceTypes, instanceTypes.map(_.asInstanceOf[NamedType].name)),
167+
.specializedFor(Nil, Nil, instanceTypes, instanceTypes.map(_.asInstanceOf[NamedType].name))
168+
.asInstanceOf[TermName],
167169
decl.flags | Flags.Synthetic,
168170
{ if (indices.length != poly.paramNames.length) // Partial Specialisation case
169171
poly.instantiate(indices, instanceTypes) // Returns a PolyType with uninstantiated types kept generic

0 commit comments

Comments
 (0)