Skip to content

Commit ddb549a

Browse files
committed
Don’t normalize the method type
1 parent 3c95dac commit ddb549a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/compiler/scala/tools/nsc/typechecker/Typers.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3422,12 +3422,11 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
34223422
// There were pattern-matching anonymous functions in the argument list which got typed as PartialFunction
34233423
// but if the inferred alternative does not actually need a PartialFunction we retype it as Function1.
34243424
def paramTypes(tpe: Type): List[Type] = tpe match {
3425-
case ExistentialType(_, qtpe) => paramTypes(qtpe)
3425+
case PolyType(_, restpe) => paramTypes(restpe)
34263426
case MethodType(syms, _) => syms.map(_.tpe)
3427-
case TypeRef(_, _, tpes) => tpes.init
3428-
case _ => Nil
3427+
case ErrorType => Nil
34293428
}
3430-
val selectedParams = paramTypes(normalize(fun.tpe))
3429+
val selectedParams = paramTypes(fun.tpe)
34313430
if(selectedParams.nonEmpty) {
34323431
context.savingUndeterminedTypeParams() {
34333432
val amode = forArgMode(fun, mode)

0 commit comments

Comments
 (0)