File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,11 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
109
109
case AppliedType (_, funArgs @ fun :: tupled :: Nil ) =>
110
110
def functionTypeEqual (baseFun : Type , actualArgs : List [Type ],
111
111
actualRet : Type , expected : Type ) =
112
+ val efp = defn.erasedFunctionParameters(baseFun)
113
+ assert(efp.size == 1 )
114
+ val erasedParams = actualArgs.map(_ => efp(0 ))
112
115
expected =:= defn.FunctionOf (actualArgs, actualRet,
113
- defn.isContextFunctionType(baseFun), defn.erasedFunctionParameters(baseFun) )
116
+ defn.isContextFunctionType(baseFun), erasedParams )
114
117
val arity : Int =
115
118
if defn.isErasedFunctionType(fun) || defn.isErasedFunctionType(fun) then - 1 // TODO support?
116
119
else if defn.isFunctionType(fun) then
You can’t perform that action at this time.
0 commit comments