File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/transform/patmat Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
323
323
import SpaceEngine ._
324
324
import tpd ._
325
325
326
- private val scalaOptionClass = ctx.requiredClassRef(" scala.Option " .toTypeName).symbol.asClass
326
+ private val scalaSomeClass = ctx.requiredClassRef(" scala.Some " .toTypeName).symbol.asClass
327
327
private val scalaSeqFactoryClass = ctx.requiredClass(" scala.collection.generic.SeqFactory" .toTypeName)
328
328
private val scalaListType = ctx.requiredClassRef(" scala.collection.immutable.List" .toTypeName)
329
329
private val scalaNilType = ctx.requiredModuleRef(" scala.collection.immutable.Nil" .toTermName)
@@ -420,7 +420,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
420
420
Kon (pat.tpe.stripAnnots, pats.map(pat => project(pat)))
421
421
else if (fun.symbol.owner == scalaSeqFactoryClass && fun.symbol.name == nme.unapplySeq)
422
422
projectList(pats)
423
- else if (! fun.symbol.info.finalResultType.isRef(scalaOptionClass ))
423
+ else if (fun.symbol.info.finalResultType.isRef(scalaSomeClass ))
424
424
Kon (pat.tpe.stripAnnots, pats.map(pat => project(pat)))
425
425
else
426
426
Fun (pat.tpe.stripAnnots, fun.tpe, pats.map(pat => project(pat)))
Original file line number Diff line number Diff line change
1
+ 20: Pattern Match Exhaustivity: _: Tree
2
+ 24: Pattern Match Exhaustivity: _: Tree
1
3
28: Pattern Match Exhaustivity: _: Tree
You can’t perform that action at this time.
0 commit comments