File tree 1 file changed +3
-2
lines changed
compiler/src/dotty/tools/dotc/transform 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -212,8 +212,9 @@ abstract class Recheck extends Phase, SymTransformer:
212
212
mt.instantiate(argTypes)
213
213
214
214
def recheckApply (tree : Apply , pt : Type )(using Context ): Type =
215
- // reuse the tree's type if the function was a signature polymorphic method, instead of rechecking it
216
- val tpe = if tree.fun.symbol.originalSignaturePolymorphic.exists then tree.fun.tpe else recheck(tree.fun)
215
+ val funTp = recheck(tree.fun)
216
+ // reuse the tree's type on signature polymorphic methods, instead of using the (wrong) rechecked one
217
+ val tpe = if tree.fun.symbol.originalSignaturePolymorphic.exists then tree.fun.tpe else funTp
217
218
tpe.widen match
218
219
case fntpe : MethodType =>
219
220
assert(fntpe.paramInfos.hasSameLengthAs(tree.args))
You can’t perform that action at this time.
0 commit comments