Skip to content

Commit 7385b9e

Browse files
committed
Fix #3189: Make TreeTypeMap in hoistSuperArgs more robust
1 parent ca4b235 commit 7385b9e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ class HoistSuperArgs extends MiniPhaseTransform with IdentityDenotTransformer {
128128
case tp: NamedType
129129
if (tp.symbol.owner == cls || tp.symbol.owner == constr) &&
130130
tp.symbol.isParamOrAccessor =>
131-
val mappedSym = origToParam(tp.symbol)
132-
if (tp.symbol.isType) mappedSym.typeRef else mappedSym.termRef
131+
origToParam.get(tp.symbol) match {
132+
case Some(mappedSym) => if (tp.symbol.isType) mappedSym.typeRef else mappedSym.termRef
133+
case None => mapOver(tp)
134+
}
133135
case _ =>
134136
mapOver(tp)
135137
}

0 commit comments

Comments
 (0)