aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/TypeApplications.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeApplications.scala')
-rw-r--r--src/dotty/tools/dotc/core/TypeApplications.scala7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/TypeApplications.scala b/src/dotty/tools/dotc/core/TypeApplications.scala
index 12eeeb674..ca5d93a02 100644
--- a/src/dotty/tools/dotc/core/TypeApplications.scala
+++ b/src/dotty/tools/dotc/core/TypeApplications.scala
@@ -45,7 +45,7 @@ class TypeApplications(val self: Type) extends AnyVal {
/** The type parameters of this type are:
* For a ClassInfo type, the type parameters of its class.
* For a typeref referring to a class, the type parameters of the class.
- * For a typeref referring to an alias or abstract type, the type parameters of
+ * For a typeref referring to a Lambda class, the type parameters of
* its right hand side or upper bound.
* For a refinement type, the type parameters of its parent, unless the refinement
* re-binds the type parameter with a type-alias.
@@ -59,7 +59,10 @@ class TypeApplications(val self: Type) extends AnyVal {
case tp: TypeRef =>
val tsym = tp.typeSymbol
if (tsym.isClass) tsym.typeParams
- else tp.underlying.typeParams
+ else {
+ val lam = LambdaClass(forcing = false)
+ if (lam.exists) lam.typeParams else Nil//tp.underlying.typeParams
+ }
case tp: RefinedType =>
val tparams = tp.parent.typeParams
tp.refinedInfo match {