Skip to content

Commit 5f598e8

Browse files
oderskysmarter
authored andcommitted
Add clause for HKApply in TypeAssigner#avoid
1 parent 83adc75 commit 5f598e8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/dotty/tools/dotc/typer/TypeAssigner.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,14 @@ trait TypeAssigner {
9494
case _ =>
9595
mapOver(tp)
9696
}
97+
case tp @ HKApply(tycon, args) if toAvoid(tycon) =>
98+
apply(tp.superType)
9799
case tp @ AppliedType(tycon, args) if toAvoid(tycon) =>
98100
val base = apply(tycon)
99101
var args = tp.baseArgInfos(base.typeSymbol)
100102
if (base.typeParams.length != args.length)
101103
args = base.typeParams.map(_.paramBounds)
102-
base.appliedTo(args)
104+
apply(base.appliedTo(args))
103105
case tp @ RefinedType(parent, name, rinfo) if variance > 0 =>
104106
val parent1 = apply(tp.parent)
105107
val refinedInfo1 = apply(rinfo)

0 commit comments

Comments
 (0)