File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -1116,16 +1116,13 @@ class Definitions {
11161116 else
11171117 FunctionType (args.length, isContextual).appliedTo(args ::: resultType :: Nil )
11181118 def unapply (ft : Type )(using Context ): Option [(List [Type ], Type , Boolean )] = {
1119- ft.dealias match
1119+ ft match
11201120 case PolyFunctionOf (mt : MethodType ) =>
11211121 Some (mt.paramInfos, mt.resType, mt.isContextualMethod)
1122- case dft =>
1123- val tsym = dft.typeSymbol
1124- if isFunctionSymbol(tsym) && ft.isRef(tsym) then
1125- val targs = dft.argInfos
1126- if (targs.isEmpty) None
1127- else Some (targs.init, targs.last, tsym.name.isContextFunction)
1128- else None
1122+ case AppliedType (parent, targs) if targs.nonEmpty && isFunctionNType(ft) =>
1123+ Some (targs.init, targs.last, ft.typeSymbol.name.isContextFunction)
1124+ case _ =>
1125+ None
11291126 }
11301127 }
11311128
You can’t perform that action at this time.
0 commit comments