File tree 1 file changed +5
-7
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -1117,14 +1117,12 @@ class Definitions {
1117
1117
case RefinedType (parent, nme.apply, mt : MethodOrPoly )
1118
1118
if parent.derivesFrom(defn.PolyFunctionClass ) || isFunctionNType(parent) =>
1119
1119
Some (mt)
1120
+ case AppliedType (parent, targs) if targs.nonEmpty && isFunctionNType(ft) =>
1121
+ val isContextual = ft.typeSymbol.name.isContextFunction
1122
+ val methodType = if isContextual then ContextualMethodType else MethodType
1123
+ Some (methodType(targs.init, targs.last))
1120
1124
case _ =>
1121
- val tsym = ft.typeSymbol
1122
- val targs = ft.argInfos
1123
- if targs.nonEmpty && isFunctionSymbol(tsym) && ft.isRef(tsym) then
1124
- val isContextual = tsym.name.isContextFunction
1125
- val methodType = if isContextual then ContextualMethodType else MethodType
1126
- Some (methodType(targs.init, targs.last))
1127
- else None
1125
+ None
1128
1126
}
1129
1127
}
1130
1128
You can’t perform that action at this time.
0 commit comments