File tree 2 files changed +9
-3
lines changed
compiler/src/dotty/tools/dotc/transform/patmat
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 {
400
400
401
401
val sig =
402
402
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 )
404
404
else if (mt.finalResultType.isRef(defn.BooleanClass ))
405
405
List ()
406
406
else {
407
407
val isUnapplySeq = unappSym.name == nme.unapplySeq
408
408
if (isProductMatch(mt.finalResultType, argLen) && ! isUnapplySeq) {
409
409
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 )
411
411
}
412
412
else {
413
413
val resTp = mt.finalResultType.select(nme.get).finalResultType.widen
414
414
if (isUnapplySeq) scalaListType.appliedTo(resTp.argTypes.head) :: Nil
415
415
else if (argLen == 0 ) Nil
416
416
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 )
418
418
else resTp :: Nil
419
419
}
420
420
}
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