aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/Substituters.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-17 15:08:59 +0100
committerMartin Odersky <odersky@gmail.com>2017-04-06 13:15:28 +0200
commit5fe6f54de36224974bdd3a9169f899f6df25971e (patch)
treeaf7d433304a4b35c38f1c2cccecee240353ffadc /compiler/src/dotty/tools/dotc/core/Substituters.scala
parent700e7ac6658a1d699502c94141091012d18519c4 (diff)
downloaddotty-5fe6f54de36224974bdd3a9169f899f6df25971e.tar.gz
dotty-5fe6f54de36224974bdd3a9169f899f6df25971e.tar.bz2
dotty-5fe6f54de36224974bdd3a9169f899f6df25971e.zip
Eliminate ParamType
Replace with ParamRef
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Substituters.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/Substituters.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Substituters.scala b/compiler/src/dotty/tools/dotc/core/Substituters.scala
index 23683608a..d565ec229 100644
--- a/compiler/src/dotty/tools/dotc/core/Substituters.scala
+++ b/compiler/src/dotty/tools/dotc/core/Substituters.scala
@@ -196,7 +196,7 @@ trait Substituters { this: Context =>
.mapOver(tp)
}
- final def substParam(tp: Type, from: ParamType, to: Type, theMap: SubstParamMap): Type =
+ final def substParam(tp: Type, from: ParamRef, to: Type, theMap: SubstParamMap): Type =
tp match {
case tp: BoundType =>
if (tp == from) to else tp
@@ -216,7 +216,7 @@ trait Substituters { this: Context =>
final def substParams(tp: Type, from: BindingType, to: List[Type], theMap: SubstParamsMap): Type =
tp match {
- case tp: ParamType =>
+ case tp: ParamRef =>
if (tp.binder == from) to(tp.paramNum) else tp
case tp: NamedType =>
if (tp.currentSymbol.isStatic) tp
@@ -269,7 +269,7 @@ trait Substituters { this: Context =>
def apply(tp: Type): Type = substRecThis(tp, from, to, this)
}
- final class SubstParamMap(from: ParamType, to: Type) extends DeepTypeMap {
+ final class SubstParamMap(from: ParamRef, to: Type) extends DeepTypeMap {
def apply(tp: Type) = substParam(tp, from, to, this)
}