aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
diff options
context:
space:
mode:
authorliu fengyun <liu@fengy.me>2017-04-14 07:44:10 +0200
committerGitHub <noreply@github.com>2017-04-14 07:44:10 +0200
commitf20ca3d358c650f6a58528018aa7d848b1f6a28f (patch)
treecaa559734278467838c669565f91a91803f32918 /compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
parent9e45ad16d012e6a2ff3be411c2fe101b1c74b831 (diff)
parent1c900a35155c0b92fd3b96794ffb55c0b0c03d9c (diff)
downloaddotty-f20ca3d358c650f6a58528018aa7d848b1f6a28f.tar.gz
dotty-f20ca3d358c650f6a58528018aa7d848b1f6a28f.tar.bz2
dotty-f20ca3d358c650f6a58528018aa7d848b1f6a28f.zip
Merge pull request #2261 from AleksanderBG/fix-2253
Fix #2253 edge cases: recurse into refined type
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform/patmat/Space.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/transform/patmat/Space.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/patmat/Space.scala b/compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
index fe2983896..53518ec9c 100644
--- a/compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
+++ b/compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
@@ -537,7 +537,12 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
tp.refinedName,
tpb.derivedTypeBounds(follow(lo, false), follow(hi, true))
)
- case tp => tp
+ case _ =>
+ tp.derivedRefinedType(
+ expose(tp.parent),
+ tp.refinedName,
+ tp.refinedInfo
+ )
}
case _ => tp
}