Skip to content

Commit d53cf4b

Browse files
committed
treat type lambdas of the form [T, ...] =>> U[T, ...] as eta-expanded U
1 parent fa95cbd commit d53cf4b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ object TypeApplications {
5757

5858
def unapply(tp: Type)(using Context): Option[Type] = tp match
5959
case tp @ HKTypeLambda(tparams, AppliedType(fn: Type, args))
60-
if fn.typeSymbol.isClass
61-
&& tparams.hasSameLengthAs(args)
60+
if tparams.hasSameLengthAs(args)
6261
&& args.lazyZip(tparams).forall((arg, tparam) => arg == tparam.paramRef)
6362
&& weakerBounds(tp, fn.typeParams) => Some(fn)
6463
case _ => None

0 commit comments

Comments
 (0)