From d5d8273fbeb6c8c303ac76d9c33f7c68511bd01b Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Thu, 31 Aug 2023 17:53:34 +0200 Subject: [PATCH] Remove unnecessary guard for AppliedType --- compiler/src/dotty/tools/dotc/core/Definitions.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/core/Definitions.scala b/compiler/src/dotty/tools/dotc/core/Definitions.scala index e4f32ea97772..846a1f68cb79 100644 --- a/compiler/src/dotty/tools/dotc/core/Definitions.scala +++ b/compiler/src/dotty/tools/dotc/core/Definitions.scala @@ -1117,7 +1117,7 @@ class Definitions { case RefinedType(parent, nme.apply, mt: MethodOrPoly) if parent.derivesFrom(defn.PolyFunctionClass) || (mt.isInstanceOf[MethodType] && isFunctionNType(parent)) => Some(mt) - case AppliedType(parent, targs) if targs.nonEmpty && isFunctionNType(ft) => + case AppliedType(parent, targs) if isFunctionNType(ft) => val isContextual = ft.typeSymbol.name.isContextFunction val methodType = if isContextual then ContextualMethodType else MethodType Some(methodType(targs.init, targs.last))