diff options
author | Martin Odersky <odersky@gmail.com> | 2016-07-22 15:22:13 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-22 15:22:13 +0200 |
commit | 013101d9f77d8283007911c61aaae7ac9cc2d486 (patch) | |
tree | ca3895373443d42008a31d505fdab66fd10b578d /src/dotty/tools/dotc/core/TypeApplications.scala | |
parent | 5968e9f6154cc8642fc3f6cef636a12104dd7a26 (diff) | |
download | dotty-013101d9f77d8283007911c61aaae7ac9cc2d486.tar.gz dotty-013101d9f77d8283007911c61aaae7ac9cc2d486.tar.bz2 dotty-013101d9f77d8283007911c61aaae7ac9cc2d486.zip |
Take curried type lambdas into account
Adapt operations TypeApplications and TypeComparer to account
for the possibilities of curried type lambdas.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeApplications.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeApplications.scala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/TypeApplications.scala b/src/dotty/tools/dotc/core/TypeApplications.scala index cb11d3fdc..af362f4da 100644 --- a/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/src/dotty/tools/dotc/core/TypeApplications.scala @@ -223,12 +223,12 @@ class TypeApplications(val self: Type) extends AnyVal { self.parent.typeParams.filterNot(_.paramName == self.refinedName) case self: RecType => self.parent.typeParams - case _: HKApply | _: SingletonType => + case _: SingletonType => Nil case self: WildcardType => self.optBounds.typeParams case self: TypeProxy => - self.underlying.typeParams + self.superType.typeParams case _ => Nil } @@ -312,14 +312,13 @@ class TypeApplications(val self: Type) extends AnyVal { case self: TypeRef => self.info.isHK case self: RefinedType => false case self: TypeLambda => true - case self: HKApply => false case self: SingletonType => false case self: TypeVar => // Using `origin` instead of `underlying`, as is done for typeParams, // avoids having to set ephemeral in some cases. self.origin.isHK case self: WildcardType => self.optBounds.isHK - case self: TypeProxy => self.underlying.isHK + case self: TypeProxy => self.superType.isHK case _ => false } |