File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/transform/patmat
docs/docs/reference/changed-features Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ object SpaceEngine {
292292 (unapp.symbol.is(Synthetic ) && unapp.symbol.owner.linkedClass.is(Case )) || // scala2 compatibility
293293 (patSize != - 1 && productArity(unappResult) == patSize) || {
294294 val isEmptyTp = extractorMemberType(unappResult, nme.isEmpty, unapp.sourcePos)
295- isEmptyTp <:< ConstantType (Constant (true ))
295+ isEmptyTp <:< ConstantType (Constant (false ))
296296 }
297297 }
298298
@@ -307,7 +307,7 @@ object SpaceEngine {
307307 isProductSeqMatch(unappResult, patSize) ||
308308 {
309309 val isEmptyTp = extractorMemberType(unappResult, nme.isEmpty, unapp.sourcePos)
310- isEmptyTp <:< ConstantType (Constant (true ))
310+ isEmptyTp <:< ConstantType (Constant (false ))
311311 }
312312 }
313313}
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ A usage of a fixed-arity extractor is irrefutable if one of the following condit
5555- ` U = true `
5656- the extractor is used as a product match
5757- ` U = Some[T] ` (for Scala2 compatibility)
58- - ` U <: R ` and ` U <: { def isEmpty: true } `
58+ - ` U <: R ` and ` U <: { def isEmpty: false } `
5959
6060### Variadic Extractors
6161
@@ -88,7 +88,7 @@ A usage of a variadic extractor is irrefutable if one of the following condition
8888
8989- the extractor is used directly as a sequence match or product-sequence match
9090- ` U = Some[T] ` (for Scala2 compatibility)
91- - ` U <: R ` and ` U <: { def isEmpty: true } `
91+ - ` U <: R ` and ` U <: { def isEmpty: false } `
9292
9393## Boolean Match
9494
You can’t perform that action at this time.
0 commit comments