Skip to content

Commit

Permalink
Remove unnecessary guard for AppliedType
Browse files Browse the repository at this point in the history
[Cherry-picked d5d8273]
  • Loading branch information
nicolasstucki authored and WojciechMazur committed Jun 22, 2024
1 parent fd4cb52 commit 5e0b79e
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 @@ -1108,7 +1108,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 5e0b79e

Please sign in to comment.