From 6a7a9fa0f0f6ce43f3c0fde10b144fdc7f941f0f Mon Sep 17 00:00:00 2001 From: Kacper Korban <39772805+KacperFKorban@users.noreply.github.com> Date: Mon, 5 Sep 2022 11:25:42 +0200 Subject: [PATCH] Combine conditions for TypeApply in isSyntheticApply Co-authored-by: odersky --- compiler/src/dotty/tools/dotc/typer/Typer.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala index 4c6875ddace3..dd3e6f2ee8ca 100644 --- a/compiler/src/dotty/tools/dotc/typer/Typer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala @@ -105,7 +105,7 @@ object Typer { */ private[typer] def isSyntheticApply(tree: tpd.Tree): Boolean = tree match { case tree: tpd.Select => tree.hasAttachment(InsertedApply) - case TypeApply(fn, targs) if targs.forall(_.isInstanceOf[tpd.InferredTypeTree]) => isSyntheticApply(fn) + case TypeApply(fn, targs) => isSyntheticApply(fn) && targs.forall(_.isInstanceOf[tpd.InferredTypeTree]) case _ => false }