diff options
author | Martin Odersky <odersky@gmail.com> | 2015-07-20 15:13:07 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-09-18 18:12:16 +0200 |
commit | ab6e5cebebe8c59901413f89281073d6eec7f8e1 (patch) | |
tree | 3f3e7545bc371caac18206bbc9f05f5a7407947d /src/dotty/tools/dotc/core/TypeApplications.scala | |
parent | 38ac02916ec0beef0cb93f0fdd48ad1f9dfdcf48 (diff) | |
download | dotty-ab6e5cebebe8c59901413f89281073d6eec7f8e1.tar.gz dotty-ab6e5cebebe8c59901413f89281073d6eec7f8e1.tar.bz2 dotty-ab6e5cebebe8c59901413f89281073d6eec7f8e1.zip |
Rewrite compareHK to be kind-correct
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeApplications.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeApplications.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/TypeApplications.scala b/src/dotty/tools/dotc/core/TypeApplications.scala index 66542d02d..18256b9e4 100644 --- a/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/src/dotty/tools/dotc/core/TypeApplications.scala @@ -149,6 +149,12 @@ class TypeApplications(val self: Type) extends AnyVal { case _ => false } + /** is receiver of the form T#$apply? */ + def isHKApply: Boolean = self match { + case TypeRef(_, name) => name == tpnme.hkApply + case _ => false + } + /** Encode the type resulting from applying this type to given arguments */ final def appliedTo(args: List[Type])(implicit ctx: Context): Type = /*>|>*/ track("appliedTo") /*<|<*/ { def matchParams(tp: Type, tparams: List[TypeSymbol], args: List[Type]): Type = args match { |