Skip to content

Commit fdf420a

Browse files
committed
only one test case fail
1 parent 23c9d37 commit fdf420a

File tree

1 file changed

+3
-3
lines changed
  • compiler/src/dotty/tools/dotc/transform/patmat

1 file changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ trait SpaceLogic {
145145
else for (Prod(tp, fun, sym, ss, full) <- acc; s <- flat) yield Prod(tp, fun, sym, ss :+ s, full)
146146
}
147147
}
148-
case Or(spaces) =>
148+
case Or(spaces) =>
149149
spaces.flatMap(flatten _)
150150
case _ => List(space)
151151
}
@@ -374,7 +374,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
374374
/* Whether the extractor method type is irrefutable */
375375
def irrefutable(unapp: tpd.Tree): Boolean = {
376376
// TODO: optionless patmat
377-
unapp.tpe.resultType.isRef(scalaSomeClass) ||
377+
unapp.tpe.widen.resultType.isRef(scalaSomeClass) ||
378378
(unapp.symbol.is(Synthetic) && unapp.symbol.owner.linkedClass.is(Case))
379379
}
380380

@@ -395,7 +395,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
395395
if (fun.symbol.name == nme.unapplySeq)
396396
projectSeq(pats)
397397
else
398-
Prod(pat.tpe.stripAnnots, fun.tpe.widen, fun.symbol, pats.map(pat => project(pat)), irrefutable(fun))
398+
Prod(pat.tpe.stripAnnots, fun.tpe.widen, fun.symbol, pats.map(project), irrefutable(fun))
399399
case Typed(pat @ UnApply(_, _, _), _) => project(pat)
400400
case Typed(expr, _) => Typ(expr.tpe.stripAnnots, true)
401401
case _ =>

0 commit comments

Comments
 (0)