File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2815,6 +2815,7 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
2815
2815
NoType
2816
2816
2817
2817
inFrozenConstraint {
2818
+ val savedConstraint = constraint
2818
2819
// Empty types break the basic assumption that if a scrutinee and a
2819
2820
// pattern are disjoint it's OK to reduce passed that pattern. Indeed,
2820
2821
// empty types viewed as a set of value is always a subset of any other
@@ -2831,7 +2832,8 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
2831
2832
if (provablyEmpty(scrut))
2832
2833
NoType
2833
2834
else
2834
- recur(cases)
2835
+ try recur(cases)
2836
+ finally constraint = savedConstraint // caseLambda additions are dropped
2835
2837
}
2836
2838
}
2837
2839
}
You can’t perform that action at this time.
0 commit comments