diff options
author | Martin Odersky <odersky@gmail.com> | 2014-12-15 16:54:08 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-12-15 16:54:08 +0100 |
commit | 3d695dd4267897ba14d814b7f12a91100ddb0f30 (patch) | |
tree | b06e60a9b6091f7b5cd3b784fc539d272eeb1894 /src/dotty/tools/dotc/typer/Applications.scala | |
parent | 332b1af33441b382b3e1efa68c5dab4fcda8b2bc (diff) | |
download | dotty-3d695dd4267897ba14d814b7f12a91100ddb0f30.tar.gz dotty-3d695dd4267897ba14d814b7f12a91100ddb0f30.tar.bz2 dotty-3d695dd4267897ba14d814b7f12a91100ddb0f30.zip |
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.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Applications.scala | 12 |
1 files changed, 4 insertions, 8 deletions
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 |