File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
compiler/src/dotty/tools/dotc/transform/patmat Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -497,6 +497,8 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
497497 def refine (parent : Type , child : Symbol ): Type = {
498498 if (child.isTerm && child.is(Case , butNot = Module )) return child.termRef // enum vals always match
499499
500+ if (child.name == tpnme.LOCAL_CHILD ) return child.typeRef
501+
500502 val childTp = if (child.isTerm) child.termRef else child.typeRef
501503
502504 val resTp = instantiate(childTp, parent)(ctx.fresh.setNewTyperState())
Original file line number Diff line number Diff line change 1+ import scala .concurrent .duration .{Duration , FiniteDuration }
2+
3+ class Test {
4+ def test (d : Duration ) = d match {
5+ case finite : FiniteDuration =>
6+ case d =>
7+ }
8+ }
You can’t perform that action at this time.
0 commit comments