File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
compiler/src/dotty/tools/dotc/transform/patmat Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -400,21 +400,21 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
400400
401401 val sig =
402402 if (isSyntheticScala2Unapply(unappSym) && caseAccessors.length == argLen)
403- caseAccessors.map(_.info.asSeenFrom(mt.paramInfos.head, caseClass).widen )
403+ caseAccessors.map(_.info.asSeenFrom(mt.paramInfos.head, caseClass).widenExpr )
404404 else if (mt.finalResultType.isRef(defn.BooleanClass ))
405405 List ()
406406 else {
407407 val isUnapplySeq = unappSym.name == nme.unapplySeq
408408 if (isProductMatch(mt.finalResultType, argLen) && ! isUnapplySeq) {
409409 productSelectors(mt.finalResultType).take(argLen)
410- .map(_.info.asSeenFrom(mt.finalResultType, mt.resultType.classSymbol).widen )
410+ .map(_.info.asSeenFrom(mt.finalResultType, mt.resultType.classSymbol).widenExpr )
411411 }
412412 else {
413413 val resTp = mt.finalResultType.select(nme.get).finalResultType.widen
414414 if (isUnapplySeq) scalaListType.appliedTo(resTp.argTypes.head) :: Nil
415415 else if (argLen == 0 ) Nil
416416 else if (isProductMatch(resTp, argLen))
417- productSelectors(resTp).map(_.info.asSeenFrom(resTp, resTp.classSymbol).widen )
417+ productSelectors(resTp).map(_.info.asSeenFrom(resTp, resTp.classSymbol).widenExpr )
418418 else resTp :: Nil
419419 }
420420 }
Original file line number Diff line number Diff line change 1+ object Test {
2+ def foo (x : Option [1 ]) = x match {
3+ case Some (1 ) =>
4+ case None =>
5+ }
6+ }
You can’t perform that action at this time.
0 commit comments