File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -77,19 +77,14 @@ object Checking {
77
77
// If `args` is a list of named arguments, return corresponding type parameters,
78
78
// otherwise return type parameters unchanged
79
79
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
85
80
val bounds = tparams.map(_.paramInfoAsSeenFrom(tree.tpe).bounds)
86
81
def instantiate (bound : Type , args : List [Type ]) =
87
82
tparams match
88
83
case LambdaParam (lam, _) :: _ =>
89
84
HKTypeLambda .fromParams(tparams, bound).appliedTo(args)
90
85
case _ =>
91
86
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)
93
88
94
89
def checkWildcardApply (tp : Type ): Unit = tp match {
95
90
case tp @ AppliedType (tycon, _) =>
You can’t perform that action at this time.
0 commit comments