Skip to content

Commit 4905ba1

Browse files
committed
Refine same-kind criterion
Need to take account of any-kinded type params
1 parent bcb20c4 commit 4905ba1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ trait ConstraintHandling[AbstractContext] {
534534
case _ =>
535535
val pbound = prune(bound)
536536
pbound.exists
537-
&& sameKind(param, pbound)
537+
&& (param.hasAnyKind || sameKind(param, pbound))
538538
&& (if fromBelow then addLowerBound(param, pbound) else addUpperBound(param, pbound))
539539
}
540540
finally addConstraintInvocations -= 1

0 commit comments

Comments
 (0)