We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9680ef9 commit efe52bdCopy full SHA for efe52bd
compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
@@ -169,7 +169,10 @@ trait SpaceLogic {
169
def tryDecompose1(tp: Type) = canDecompose(tp) && isSubspace(Or(decompose(tp)), b)
170
def tryDecompose2(tp: Type) = canDecompose(tp) && isSubspace(a, Or(decompose(tp)))
171
172
- (simplify(a), simplify(b)) match {
+ val a2 = simplify(a)
173
+ val b2 = simplify(b)
174
+ if (a ne a2) || (b ne b2) then isSubspace(a2, b2)
175
+ else (a, b) match {
176
case (Empty, _) => true
177
case (_, Empty) => false
178
case (Or(ss), _) =>
0 commit comments