Fix Lower rule. Include WTVs on left side aswell

This commit is contained in:
Andreas Stadelmeier 2024-04-01 17:04:59 +02:00
parent 059217974d
commit 931b65fa14

View File

@ -71,7 +71,7 @@ class Rules(cs: ConstraintSet, fc: ExtendsRelations, tvFactory: TypeVariableFact
case LessDot(left: (RefType | Wildcard), right: Wildcard, cc) => // Lower
cs.remove(cons)
cs.add(LessDot(left, cs.wildcardEnv.getLowerBound(right)))
case LessDot(left: TypeVariable, right: Wildcard, cc) // if !deltaIn.contains(right)
case LessDot(left: TypePlaceholder, right: Wildcard, cc) // if !deltaIn.contains(right)
=> // Lower
cs.remove(cons)
cs.add(LessDot(left, cs.wildcardEnv.getLowerBound(right)))