Skip to content

Commit 900982c

Browse files
committed
Fix paramInfoAsSeenFrom argument in typedAppliedTypeTree
The asSeenFrom is always wrt the type-constructor, not its prefix. This is because the parameter is treated as a member of the type constructor. It is strange that no test case caught this.
1 parent 3eb6d92 commit 900982c

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.normalizedPrefix)
1241+
def tparamBounds = tparam.paramInfoAsSeenFrom(tpt1.tpe)
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)