aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 092c78d4f..18f6fa89a 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -520,8 +520,8 @@ class Typer extends Namer with Applications with Implicits {
else {
val params = args.asInstanceOf[List[untpd.ValDef]]
val (protoFormals, protoResult): (List[Type], Type) = pt match {
- case _ if pt isRef defn.FunctionClass(params.length) =>
- (pt.typeArgs take params.length, pt.typeArgs.last)
+ case _ if defn.isFunctionType(pt) =>
+ (pt.dealias.typeArgs.init, pt.dealias.typeArgs.last)
case SAMType(meth) =>
val mt @ MethodType(_, paramTypes) = meth.info
(paramTypes, mt.resultType)