Skip to content

Commit 0d13ba6

Browse files
oderskyallanrenucci
authored andcommitted
Another fix to compute the bounds of type parameters in typedAppliedTypeTree
We need to take care that the asSeenFrom is from a * type, not a type constructor.
1 parent e348351 commit 0d13ba6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ class Typer extends Namer
12381238
args = args.take(tparams.length)
12391239
}
12401240
def typedArg(arg: untpd.Tree, tparam: ParamInfo) = {
1241-
def tparamBounds = tparam.paramInfoAsSeenFrom(tpt1.tpe)
1241+
def tparamBounds = tparam.paramInfoAsSeenFrom(tpt1.tpe.appliedTo(tparams.map(_ => TypeBounds.empty)))
12421242
val (desugaredArg, argPt) =
12431243
if (ctx.mode is Mode.Pattern)
12441244
(if (untpd.isVarPattern(arg)) desugar.patternVar(arg) else arg, tparamBounds)

0 commit comments

Comments
 (0)