Skip to content

Commit f831b21

Browse files
committed
Handle TypeVar in addConstraint
1 parent ef653b6 commit f831b21

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,8 @@ trait ConstraintHandling {
864864
try bound match
865865
case bound: TypeParamRef if constraint contains bound =>
866866
addParamBound(bound)
867+
case bound: TypeVar if constraint.contains(bound) =>
868+
addParamBound(bound.origin)
867869
case _ =>
868870
val pbound = avoidLambdaParams(bound)
869871
kindCompatible(param, pbound) && addBoundTransitively(param, pbound, !fromBelow)

0 commit comments

Comments
 (0)