aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Substituters.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-12-09 16:26:18 +0100
committerMartin Odersky <odersky@gmail.com>2014-12-10 18:54:02 +0100
commitb1b76515a66d94e9552f3ccde02cb4d1bacbc0ec (patch)
treecf25808e742e884631174e989133413214d6248d /src/dotty/tools/dotc/core/Substituters.scala
parent176d677258051fd1eef1d1bf26575919cab03530 (diff)
downloaddotty-b1b76515a66d94e9552f3ccde02cb4d1bacbc0ec.tar.gz
dotty-b1b76515a66d94e9552f3ccde02cb4d1bacbc0ec.tar.bz2
dotty-b1b76515a66d94e9552f3ccde02cb4d1bacbc0ec.zip
Moved derivedTypeAlias method to TypeAlias
Diffstat (limited to 'src/dotty/tools/dotc/core/Substituters.scala')
-rw-r--r--src/dotty/tools/dotc/core/Substituters.scala40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/dotty/tools/dotc/core/Substituters.scala b/src/dotty/tools/dotc/core/Substituters.scala
index 02d09d542..02810733a 100644
--- a/src/dotty/tools/dotc/core/Substituters.scala
+++ b/src/dotty/tools/dotc/core/Substituters.scala
@@ -18,8 +18,8 @@ trait Substituters { this: Context =>
tp
case tp: RefinedType =>
tp.derivedRefinedType(subst(tp.parent, from, to, theMap), tp.refinedName, subst(tp.refinedInfo, from, to, theMap))
- case tp: TypeBounds if tp.lo eq tp.hi =>
- tp.derivedTypeAlias(subst(tp.lo, from, to, theMap))
+ case tp: TypeAlias =>
+ tp.derivedTypeAlias(subst(tp.alias, from, to, theMap))
case _ =>
(if (theMap != null) theMap else new SubstBindingMap(from, to))
.mapOver(tp)
@@ -36,8 +36,8 @@ trait Substituters { this: Context =>
tp
case tp: RefinedType =>
tp.derivedRefinedType(subst1(tp.parent, from, to, theMap), tp.refinedName, subst1(tp.refinedInfo, from, to, theMap))
- case tp: TypeBounds if tp.lo eq tp.hi =>
- tp.derivedTypeAlias(subst1(tp.lo, from, to, theMap))
+ case tp: TypeAlias =>
+ tp.derivedTypeAlias(subst1(tp.alias, from, to, theMap))
case _ =>
(if (theMap != null) theMap else new Subst1Map(from, to))
.mapOver(tp)
@@ -56,8 +56,8 @@ trait Substituters { this: Context =>
tp
case tp: RefinedType =>
tp.derivedRefinedType(subst2(tp.parent, from1, to1, from2, to2, theMap), tp.refinedName, subst2(tp.refinedInfo, from1, to1, from2, to2, theMap))
- case tp: TypeBounds if tp.lo eq tp.hi =>
- tp.derivedTypeAlias(subst2(tp.lo, from1, to1, from2, to2, theMap))
+ case tp: TypeAlias =>
+ tp.derivedTypeAlias(subst2(tp.alias, from1, to1, from2, to2, theMap))
case _ =>
(if (theMap != null) theMap else new Subst2Map(from1, to1, from2, to2))
.mapOver(tp)
@@ -81,8 +81,8 @@ trait Substituters { this: Context =>
tp
case tp: RefinedType =>
tp.derivedRefinedType(subst(tp.parent, from, to, theMap), tp.refinedName, subst(tp.refinedInfo, from, to, theMap))
- case tp: TypeBounds if tp.lo eq tp.hi =>
- tp.derivedTypeAlias(subst(tp.lo, from, to, theMap))
+ case tp: TypeAlias =>
+ tp.derivedTypeAlias(subst(tp.alias, from, to, theMap))
case _ =>
(if (theMap != null) theMap else new SubstMap(from, to))
.mapOver(tp)
@@ -115,8 +115,8 @@ trait Substituters { this: Context =>
tp
case tp: RefinedType =>
tp.derivedRefinedType(substDealias(tp.parent, from, to, theMap), tp.refinedName, substDealias(tp.refinedInfo, from, to, theMap))
- case tp: TypeBounds if tp.lo eq tp.hi =>
- tp.derivedTypeAlias(substDealias(tp.lo, from, to, theMap))
+ case tp: TypeAlias =>
+ tp.derivedTypeAlias(substDealias(tp.alias, from, to, theMap))
case _ =>
(if (theMap != null) theMap else new SubstDealiasMap(from, to))
.mapOver(tp)
@@ -154,8 +154,8 @@ trait Substituters { this: Context =>
tp
case tp: RefinedType =>
tp.derivedRefinedType(substSym(tp.parent, from, to, theMap), tp.refinedName, substSym(tp.refinedInfo, from, to, theMap))
- case tp: TypeBounds if tp.lo eq tp.hi =>
- tp.derivedTypeAlias(substSym(tp.lo, from, to, theMap))
+ case tp: TypeAlias =>
+ tp.derivedTypeAlias(substSym(tp.alias, from, to, theMap))
case _ =>
(if (theMap != null) theMap else new SubstSymMap(from, to))
.mapOver(tp)
@@ -172,8 +172,8 @@ trait Substituters { this: Context =>
tp
case tp: RefinedType =>
tp.derivedRefinedType(substThis(tp.parent, from, to, theMap), tp.refinedName, substThis(tp.refinedInfo, from, to, theMap))
- case tp: TypeBounds if tp.lo eq tp.hi =>
- tp.derivedTypeAlias(substThis(tp.lo, from, to, theMap))
+ case tp: TypeAlias =>
+ tp.derivedTypeAlias(substThis(tp.alias, from, to, theMap))
case _ =>
(if (theMap != null) theMap else new SubstThisMap(from, to))
.mapOver(tp)
@@ -190,8 +190,8 @@ trait Substituters { this: Context =>
tp
case tp: RefinedType =>
tp.derivedRefinedType(substThis(tp.parent, from, to, theMap), tp.refinedName, substThis(tp.refinedInfo, from, to, theMap))
- case tp: TypeBounds if tp.lo eq tp.hi =>
- tp.derivedTypeAlias(substThis(tp.lo, from, to, theMap))
+ case tp: TypeAlias =>
+ tp.derivedTypeAlias(substThis(tp.alias, from, to, theMap))
case _ =>
(if (theMap != null) theMap else new SubstRefinedThisMap(from, to))
.mapOver(tp)
@@ -208,8 +208,8 @@ trait Substituters { this: Context =>
tp
case tp: RefinedType =>
tp.derivedRefinedType(substParam(tp.parent, from, to, theMap), tp.refinedName, substParam(tp.refinedInfo, from, to, theMap))
- case tp: TypeBounds if tp.lo eq tp.hi =>
- tp.derivedTypeAlias(substParam(tp.lo, from, to, theMap))
+ case tp: TypeAlias =>
+ tp.derivedTypeAlias(substParam(tp.alias, from, to, theMap))
case _ =>
(if (theMap != null) theMap else new SubstParamMap(from, to))
.mapOver(tp)
@@ -226,8 +226,8 @@ trait Substituters { this: Context =>
tp
case tp: RefinedType =>
tp.derivedRefinedType(substParams(tp.parent, from, to, theMap), tp.refinedName, substParams(tp.refinedInfo, from, to, theMap))
- case tp: TypeBounds if tp.lo eq tp.hi =>
- tp.derivedTypeAlias(substParams(tp.lo, from, to, theMap))
+ case tp: TypeAlias =>
+ tp.derivedTypeAlias(substParams(tp.alias, from, to, theMap))
case _ =>
(if (theMap != null) theMap else new SubstParamsMap(from, to))
.mapOver(tp)