diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-17 13:30:19 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-06 13:15:28 +0200 |
commit | 70b3b90d686f3444e6b16cbf9deedc8aed0c62e8 (patch) | |
tree | 90521bcb625e2ec6d67ad0116e03d075f28ce704 /compiler/src/dotty/tools/dotc/core/TypeApplications.scala | |
parent | 2b5d1a80023f5676f5a97f0c56919c1f04f7ce2f (diff) | |
download | dotty-70b3b90d686f3444e6b16cbf9deedc8aed0c62e8.tar.gz dotty-70b3b90d686f3444e6b16cbf9deedc8aed0c62e8.tar.bz2 dotty-70b3b90d686f3444e6b16cbf9deedc8aed0c62e8.zip |
Rename PolyParam --> TypeParamRef
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/TypeApplications.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/TypeApplications.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/TypeApplications.scala b/compiler/src/dotty/tools/dotc/core/TypeApplications.scala index 931f0dc74..77767a38c 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeApplications.scala @@ -163,15 +163,15 @@ object TypeApplications { class Reducer(tycon: PolyType, args: List[Type])(implicit ctx: Context) extends TypeMap { private var available = (0 until args.length).toSet var allReplaced = true - def hasWildcardArg(p: PolyParam) = + def hasWildcardArg(p: TypeParamRef) = p.binder == tycon && args(p.paramNum).isInstanceOf[TypeBounds] - def canReduceWildcard(p: PolyParam) = + def canReduceWildcard(p: TypeParamRef) = !ctx.mode.is(Mode.AllowLambdaWildcardApply) || available.contains(p.paramNum) def apply(t: Type) = t match { - case t @ TypeAlias(p: PolyParam) if hasWildcardArg(p) && canReduceWildcard(p) => + case t @ TypeAlias(p: TypeParamRef) if hasWildcardArg(p) && canReduceWildcard(p) => available -= p.paramNum args(p.paramNum) - case p: PolyParam if p.binder == tycon => + case p: TypeParamRef if p.binder == tycon => args(p.paramNum) match { case TypeBounds(lo, hi) => if (ctx.mode.is(Mode.AllowLambdaWildcardApply)) { allReplaced = false; p } |