diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-17 15:08:59 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-06 13:15:28 +0200 |
commit | 5fe6f54de36224974bdd3a9169f899f6df25971e (patch) | |
tree | af7d433304a4b35c38f1c2cccecee240353ffadc /compiler/src/dotty/tools/dotc/core/Types.scala | |
parent | 700e7ac6658a1d699502c94141091012d18519c4 (diff) | |
download | dotty-5fe6f54de36224974bdd3a9169f899f6df25971e.tar.gz dotty-5fe6f54de36224974bdd3a9169f899f6df25971e.tar.bz2 dotty-5fe6f54de36224974bdd3a9169f899f6df25971e.zip |
Eliminate ParamType
Replace with ParamRef
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/Types.scala | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index 074d2e1fb..217e5e351 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -1199,7 +1199,7 @@ object Types { ctx.substRecThis(this, binder, tp, null) /** Substitute a bound type by some other type */ - final def substParam(from: ParamType, to: Type)(implicit ctx: Context): Type = + final def substParam(from: ParamRef, to: Type)(implicit ctx: Context): Type = ctx.substParam(this, from, to, null) /** Substitute bound types by some other types */ @@ -2411,8 +2411,6 @@ object Types { type PInfo = Type type This <: TermLambda - def paramNames: List[TermName] - override def resultType(implicit ctx: Context): Type = if (dependencyStatus == FalseDeps) { // dealias all false dependencies val dealiasMap = new TypeMap { @@ -2831,7 +2829,7 @@ object Types { unique(new CachedHKApply(tycon, args)).checkInst } - // ----- Bound types: MethodParam, TypeParamRef -------------------------- + // ----- BoundTypes: ParamRef, RecThis ---------------------------------------- abstract class BoundType extends CachedProxyType with ValueType { type BT <: Type @@ -2839,13 +2837,9 @@ object Types { def copyBoundType(bt: BT): Type } - abstract class ParamType extends BoundType { - def paramNum: Int - def paramName: Name - } - - abstract class ParamRef extends ParamType { + abstract class ParamRef extends BoundType { type BT <: LambdaType + def paramNum: Int def paramName: binder.ThisName = binder.paramNames(paramNum) override def underlying(implicit ctx: Context): Type = { |