File tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1677,8 +1677,10 @@ class Namer { typer: Typer =>
1677
1677
// 5. Info of CP is copied to DP and DP is completed.
1678
1678
index(ddef.leadingTypeParams)
1679
1679
if (isConstructor) sym.owner.typeParams.foreach(_.ensureCompleted())
1680
- completer.setCompletedTypeParams(
1681
- for tparam <- ddef.leadingTypeParams yield typedAheadExpr(tparam).symbol.asType)
1680
+ val completedTypeParams =
1681
+ for tparam <- ddef.leadingTypeParams yield typedAheadExpr(tparam).symbol
1682
+ if completedTypeParams.forall(_.isType) then
1683
+ completer.setCompletedTypeParams(completedTypeParams.asInstanceOf [List [TypeSymbol ]])
1682
1684
ddef.trailingParamss.foreach(completeParams)
1683
1685
val paramSymss = normalizeIfConstructor(ddef.paramss.nestedMap(symbolOfTree), isConstructor)
1684
1686
sym.setParamss(paramSymss)
You can’t perform that action at this time.
0 commit comments