Skip to content

Commit 3d695dd

Browse files
committed
Made typedUnApply a hook that has to be overridden in a ReTyper.
Change exhibits a problem in the transformers: pattern matching try's do not seem to be handled.
1 parent 332b1af commit 3d695dd

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -763,15 +763,11 @@ trait Applications extends Compatibility { self: Typer =>
763763
}
764764
}
765765

766-
/** A dummmy typed unapply, to make re-typers between frontend and pattern matcher
767-
* visit all subnodes of an unApply tree.
766+
/** A typed unapply hook, can be overridden by re any-typers between frontend
767+
* and pattern matcher.
768768
*/
769-
def typedUnApply(tree: untpd.UnApply, selType: Type)(implicit ctx: Context) = {
770-
val unappType = typed(tree.fun)
771-
tree.implicits.foreach(typed(_))
772-
tree.patterns.foreach(typedPattern(_))
773-
tree.withType(selType)
774-
}
769+
def typedUnApply(tree: untpd.UnApply, selType: Type)(implicit ctx: Context) =
770+
throw new UnsupportedOperationException("cannot type check an UnApply node")
775771

776772
/** Is given method reference applicable to type arguments `targs` and argument trees `args`?
777773
* @param resultType The expected result type of the application

0 commit comments

Comments
 (0)