Skip to content

Commit 3f45540

Browse files
committed
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).
1 parent e43da04 commit 3f45540

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/dotty/tools/dotc/core/TypeApplications.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ object TypeApplications {
5757
assert(argBoundss.length == variances.length)
5858
RefinedType(
5959
argRefinements(defn.LambdaTrait(variances).typeRef, 0, argBoundss),
60-
tpnme.hkApply, rt => bodyFn(rt).bounds)
60+
tpnme.hkApply, rt => TypeAlias(bodyFn(rt), 1))
6161
}
6262

6363
def unapply(tp: Type)(implicit ctx: Context): Option[(List[Int], List[TypeBounds], Type)] = tp match {

src/dotty/tools/dotc/core/Types.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ object Types {
19291929
false
19301930
}
19311931
override def computeHash = doHash(refinedName, refinedInfo, parent)
1932-
override def toString = s"RefinedType($parent, $refinedName, $refinedInfo | $hashCode)" // !!! TODO: remove
1932+
override def toString = s"RefinedType($parent, $refinedName, $refinedInfo)"
19331933
}
19341934

19351935
class CachedRefinedType(parent: Type, refinedName: Name, infoFn: RefinedType => Type) extends RefinedType(parent, refinedName) {

0 commit comments

Comments
 (0)