Skip to content

Commit c938deb

Browse files
committed
Use typedUnadapted instead of typedExpr in ReTyper.typedUnApply
1 parent 7256a12 commit c938deb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ class ReTyper extends Typer {
5858
}
5959

6060
override def typedUnApply(tree: untpd.UnApply, selType: Type)(implicit ctx: Context): UnApply = {
61-
val funProto = new UnapplyFunProto(WildcardType, this)
62-
63-
val fun1 = typedExpr(tree.fun, funProto)
61+
val fun1 = typedUnadapted(tree.fun, AnyFunctionProto)
6462
val implicits1 = tree.implicits.map(typedExpr(_))
6563
val patterns1 = tree.patterns.mapconserve(pat => typed(pat, pat.tpe))
6664
untpd.cpy.UnApply(tree)(fun1, implicits1, patterns1).withType(tree.tpe)

0 commit comments

Comments
 (0)