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 cd2e68d commit 21d983cCopy full SHA for 21d983c
compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
@@ -372,7 +372,8 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
372
/* Whether the extractor method type is irrefutable */
373
def irrefutable(unapp: tpd.Tree): Boolean = {
374
// TODO: optionless patmat
375
- unapp.tpe.resultType.isRef(scalaSomeClass) || (unapp.symbol.is(allOf(Synthetic, Case)))
+ unapp.tpe.resultType.isRef(scalaSomeClass) ||
376
+ (unapp.symbol.is(Synthetic) && unapp.symbol.owner.linkedClass.is(Case))
377
}
378
379
/** Return the space that represents the pattern `pat`
0 commit comments