File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -56,12 +56,11 @@ object Checking {
56
56
case AppliedTypeTree (tycon, args) =>
57
57
// If `args` is a list of named arguments, return corresponding type parameters,
58
58
// otherwise return type parameters unchanged
59
- def matchNamed (tparams : List [TypeSymbol ], args : List [Tree ]): List [Symbol ] = args match {
60
- case ( _ : NamedArg ) :: _ =>
59
+ def matchNamed (tparams : List [TypeSymbol ], args : List [Tree ]): List [Symbol ] =
60
+ if (hasNamedArg(args))
61
61
for (NamedArg (name, _) <- args) yield tycon.tpe.member(name).symbol
62
- case _ =>
62
+ else
63
63
tparams
64
- }
65
64
val tparams = matchNamed(tycon.tpe.typeSymbol.typeParams, args)
66
65
val bounds = tparams.map(tparam =>
67
66
tparam.info.asSeenFrom(tycon.tpe.normalizedPrefix, tparam.owner.owner).bounds)
You can’t perform that action at this time.
0 commit comments