Skip to content

Commit de90ac1

Browse files
committed
Remove handler for erased params in synthesizer
1 parent e89f4a0 commit de90ac1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

compiler/src/dotty/tools/dotc/typer/Synthesizer.scala

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,10 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
109109
case AppliedType(_, funArgs @ fun :: tupled :: Nil) =>
110110
def functionTypeEqual(baseFun: Type, actualArgs: List[Type],
111111
actualRet: Type, expected: Type) =
112-
val efp = defn.erasedFunctionParameters(baseFun)
113-
assert(efp.size == 1)
114-
val erasedParams = actualArgs.map(_ => efp(0))
115112
expected =:= defn.FunctionOf(actualArgs, actualRet,
116-
defn.isContextFunctionType(baseFun), erasedParams)
113+
defn.isContextFunctionType(baseFun), List() /* erased functions not supported */)
117114
val arity: Int =
118-
if defn.isErasedFunctionType(fun) || defn.isErasedFunctionType(fun) then -1 // TODO support?
115+
if defn.isErasedFunctionType(fun) then -1 // TODO support?
119116
else if defn.isFunctionType(fun) then
120117
// TupledFunction[(...) => R, ?]
121118
fun.dropDependentRefinement.dealias.argInfos match

0 commit comments

Comments
 (0)