File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -75,12 +75,8 @@ object Checking {
75
75
}.getOrElse(TypeTree (tparam.paramRef))
76
76
val orderedArgs = if (hasNamedArg(args)) tparams.map(argNamed) else args
77
77
val bounds = tparams.map(_.paramInfoAsSeenFrom(tree.tpe).bounds)
78
- def instantiate (bound : Type , args : List [Type ]) = tparams match {
79
- case (_ : Symbol ) :: _ if args.exists(_.isInstanceOf [TypeBounds ]) =>
80
- bound.substApprox(tparams.asInstanceOf [List [Symbol ]], args)
81
- case _ =>
82
- HKTypeLambda .fromParams(tparams, bound).appliedTo(args)
83
- }
78
+ def instantiate (bound : Type , args : List [Type ]) =
79
+ HKTypeLambda .fromParams(tparams, bound).appliedTo(args)
84
80
if (boundsCheck) checkBounds(orderedArgs, bounds, instantiate)
85
81
86
82
def checkWildcardApply (tp : Type ): Unit = tp match {
You can’t perform that action at this time.
0 commit comments