We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9dca4a6 commit 1c3a286Copy full SHA for 1c3a286
compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala
@@ -144,9 +144,9 @@ trait PatternTypeConstrainer { self: TypeComparer =>
144
case tb: TypeBounds =>
145
val hi = tb.hi
146
constrainPatternType(pat, hi)
147
- case null => false
+ case null => true
148
}
149
- case _ => false
+ case _ => true
150
151
152
def trySuperType =
@@ -159,7 +159,7 @@ trait PatternTypeConstrainer { self: TypeComparer =>
159
tryConstrainSimplePatternType(pat, upcasted) || constrainUpcasted(upcasted)
160
else true
161
162
- tryGadtBounds || trySuperType
+ tryGadtBounds && trySuperType
163
164
165
0 commit comments