From 3d695dd4267897ba14d814b7f12a91100ddb0f30 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 15 Dec 2014 16:54:08 +0100 Subject: 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. --- src/dotty/tools/dotc/typer/Applications.scala | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/dotty/tools/dotc/typer/Applications.scala') diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index d54ff21be..c012e8837 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -763,15 +763,11 @@ trait Applications extends Compatibility { self: Typer => } } - /** A dummmy typed unapply, to make re-typers between frontend and pattern matcher - * visit all subnodes of an unApply tree. + /** A typed unapply hook, can be overridden by re any-typers between frontend + * and pattern matcher. */ - def typedUnApply(tree: untpd.UnApply, selType: Type)(implicit ctx: Context) = { - val unappType = typed(tree.fun) - tree.implicits.foreach(typed(_)) - tree.patterns.foreach(typedPattern(_)) - tree.withType(selType) - } + def typedUnApply(tree: untpd.UnApply, selType: Type)(implicit ctx: Context) = + throw new UnsupportedOperationException("cannot type check an UnApply node") /** Is given method reference applicable to type arguments `targs` and argument trees `args`? * @param resultType The expected result type of the application -- cgit v1.2.3