Skip to content

Commit 9b73f77

Browse files
committed
Drop handling of named type arguments in checkAppliedType
Named arguments of types are no longer supported, so this was dead code.
1 parent 5cb511a commit 9b73f77

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

compiler/src/dotty/tools/dotc/typer/Checking.scala

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,14 @@ object Checking {
7777
// If `args` is a list of named arguments, return corresponding type parameters,
7878
// otherwise return type parameters unchanged
7979
val tparams = tycon.tpe.typeParams
80-
def argNamed(tparam: ParamInfo) = args.find {
81-
case NamedArg(name, _) => name == tparam.paramName
82-
case _ => false
83-
}.getOrElse(TypeTree(tparam.paramRef))
84-
val orderedArgs = if (hasNamedArg(args)) tparams.map(argNamed) else args
8580
val bounds = tparams.map(_.paramInfoAsSeenFrom(tree.tpe).bounds)
8681
def instantiate(bound: Type, args: List[Type]) =
8782
tparams match
8883
case LambdaParam(lam, _) :: _ =>
8984
HKTypeLambda.fromParams(tparams, bound).appliedTo(args)
9085
case _ =>
9186
bound // paramInfoAsSeenFrom already took care of instantiation in this case
92-
if (boundsCheck) checkBounds(orderedArgs, bounds, instantiate, tree.tpe)
87+
if (boundsCheck) checkBounds(args, bounds, instantiate, tree.tpe)
9388

9489
def checkWildcardApply(tp: Type): Unit = tp match {
9590
case tp @ AppliedType(tycon, _) =>

0 commit comments

Comments
 (0)