Skip to content

Commit

Permalink
Remove unnecessary guard for AppliedType
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Aug 31, 2023
1 parent cb34be5 commit 65f6dfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Definitions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 65f6dfa

Please sign in to comment.