Skip to content

Commit fca6688

Browse files
committed
Fix tests
1 parent 4dfb838 commit fca6688

File tree

1 file changed

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

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,10 +521,11 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
521521
inContext(ctx.fresh.setNewTyperState()) {
522522
val tvars = pt.paramInfos.map(newTypeVar)
523523
val mt = pt.instantiate(tvars).asInstanceOf[MethodType]
524-
// println("mt.paramInfos(0) = " + mt.paramInfos(0))
525524
scrutineeTp <:< mt.paramInfos(0)
526-
isFullyDefined(mt, ForceDegree.flipBottom)
527-
// println("mt = " + mt)
525+
// force type inference to infer a narrower type: could be singleton
526+
// see tests/patmat/i4227.scala
527+
mt.paramInfos(0) <:< scrutineeTp
528+
isFullyDefined(mt, ForceDegree.all)
528529
mt
529530
}
530531
}

0 commit comments

Comments
 (0)