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 {
7575 }.getOrElse(TypeTree (tparam.paramRef))
7676 val orderedArgs = if (hasNamedArg(args)) tparams.map(argNamed) else args
7777 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)
8480 if (boundsCheck) checkBounds(orderedArgs, bounds, instantiate)
8581
8682 def checkWildcardApply (tp : Type ): Unit = tp match {
You can’t perform that action at this time.
0 commit comments