File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -1117,14 +1117,12 @@ class Definitions {
11171117 case RefinedType (parent, nme.apply, mt : MethodOrPoly )
11181118 if parent.derivesFrom(defn.PolyFunctionClass ) || isFunctionNType(parent) =>
11191119 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))
11201124 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
11281126 }
11291127 }
11301128
You can’t perform that action at this time.
0 commit comments