diff options
author | Martin Odersky <odersky@gmail.com> | 2015-12-02 10:58:44 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-12-06 16:09:20 +0100 |
commit | f89b5628a66442edcc8c31193a559c6b5c32e837 (patch) | |
tree | 9f68cac5c14258449088d1021016377e7276c53b /src/dotty/tools/dotc/core/Types.scala | |
parent | 0fde4b4902f81f9a020dbf460925596a276ab328 (diff) | |
download | dotty-f89b5628a66442edcc8c31193a559c6b5c32e837.tar.gz dotty-f89b5628a66442edcc8c31193a559c6b5c32e837.tar.bz2 dotty-f89b5628a66442edcc8c31193a559c6b5c32e837.zip |
Add missing type params in test
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 61d9093bc..566268455 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -855,7 +855,7 @@ object Types { object instantiate extends TypeMap { var isSafe = true def apply(tp: Type): Type = tp match { - case TypeRef(RefinedThis(`pre`), name) if name.isLambdaArgName => + case TypeRef(RefinedThis(`pre`), name) if name.isHkArgName => member(name).info match { case TypeAlias(alias) => alias case _ => isSafe = false; tp @@ -868,7 +868,7 @@ object Types { } } def instArg(tp: Type): Type = tp match { - case tp @ TypeAlias(TypeRef(RefinedThis(`pre`), name)) if name.isLambdaArgName => + case tp @ TypeAlias(TypeRef(RefinedThis(`pre`), name)) if name.isHkArgName => member(name).info match { case TypeAlias(alias) => tp.derivedTypeAlias(alias) // needed to keep variance case bounds => bounds @@ -1899,15 +1899,15 @@ object Types { private def checkInst(implicit ctx: Context): this.type = { if (Config.checkLambdaVariance) refinedInfo match { - case refinedInfo: TypeBounds if refinedInfo.variance != 0 && refinedName.isLambdaArgName => + case refinedInfo: TypeBounds if refinedInfo.variance != 0 && refinedName.isHkArgName => val cls = parent.LambdaClass(forcing = false) if (cls.exists) - assert(refinedInfo.variance == cls.typeParams.apply(refinedName.LambdaArgIndex).variance, - s"variance mismatch for $this, $cls, ${cls.typeParams}, ${cls.typeParams.apply(refinedName.LambdaArgIndex).variance}, ${refinedInfo.variance}") + assert(refinedInfo.variance == cls.typeParams.apply(refinedName.hkArgIndex).variance, + s"variance mismatch for $this, $cls, ${cls.typeParams}, ${cls.typeParams.apply(refinedName.hkArgIndex).variance}, ${refinedInfo.variance}") case _ => } if (Config.checkProjections && - (refinedName == tpnme.hkApply || refinedName.isLambdaArgName) && + (refinedName == tpnme.hkApply || refinedName.isHkArgName) && parent.noHK) assert(false, s"illegal refinement of first-order type: $this") this |