aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-12-03 10:31:15 +0100
committerMartin Odersky <odersky@gmail.com>2015-12-06 16:09:22 +0100
commit8db7a9b8914e0f66207db9d998f1186f8e195f85 (patch)
tree2ae3d1effab27980cc5b6580a41d97da470c0864 /src/dotty/tools
parent05c0e55850a5b086e38d3a54e937106f727fbe8e (diff)
downloaddotty-8db7a9b8914e0f66207db9d998f1186f8e195f85.tar.gz
dotty-8db7a9b8914e0f66207db9d998f1186f8e195f85.tar.bz2
dotty-8db7a9b8914e0f66207db9d998f1186f8e195f85.zip
Fix bug computing typeParams for hk types
Arg bounds do not count is bindings. Also: TypeLambda's $Apply binding should be covariant, because the parameter is (not sure it matters though).
Diffstat (limited to 'src/dotty/tools')
-rw-r--r--src/dotty/tools/dotc/core/TypeApplications.scala2
-rw-r--r--src/dotty/tools/dotc/core/Types.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/TypeApplications.scala b/src/dotty/tools/dotc/core/TypeApplications.scala
index 5b34fe662..5f7b730d2 100644
--- a/src/dotty/tools/dotc/core/TypeApplications.scala
+++ b/src/dotty/tools/dotc/core/TypeApplications.scala
@@ -57,7 +57,7 @@ object TypeApplications {
assert(argBoundss.length == variances.length)
RefinedType(
argRefinements(defn.LambdaTrait(variances).typeRef, 0, argBoundss),
- tpnme.hkApply, rt => bodyFn(rt).bounds)
+ tpnme.hkApply, rt => TypeAlias(bodyFn(rt), 1))
}
def unapply(tp: Type)(implicit ctx: Context): Option[(List[Int], List[TypeBounds], Type)] = tp match {
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 84d74b0f4..4af4d0c14 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -1929,7 +1929,7 @@ object Types {
false
}
override def computeHash = doHash(refinedName, refinedInfo, parent)
- override def toString = s"RefinedType($parent, $refinedName, $refinedInfo | $hashCode)" // !!! TODO: remove
+ override def toString = s"RefinedType($parent, $refinedName, $refinedInfo)"
}
class CachedRefinedType(parent: Type, refinedName: Name, infoFn: RefinedType => Type) extends RefinedType(parent, refinedName) {