File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 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 =>
16771677 // 5. Info of CP is copied to DP and DP is completed.
16781678 index(ddef.leadingTypeParams)
16791679 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 ]])
16821684 ddef.trailingParamss.foreach(completeParams)
16831685 val paramSymss = normalizeIfConstructor(ddef.paramss.nestedMap(symbolOfTree), isConstructor)
16841686 sym.setParamss(paramSymss)
You can’t perform that action at this time.
0 commit comments