diff options
author | Martin Odersky <odersky@gmail.com> | 2017-02-17 16:38:06 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-02-17 16:38:06 +0100 |
commit | 80511914713237de894f896da7397965e52134a7 (patch) | |
tree | 0413b633ef8baafe30eb86188c59b78a31fca2ba /compiler/src/dotty/tools/dotc/typer/Applications.scala | |
parent | 6df672c7e7be65d7be1cd6524c610aed4f35178c (diff) | |
download | dotty-80511914713237de894f896da7397965e52134a7.tar.gz dotty-80511914713237de894f896da7397965e52134a7.tar.bz2 dotty-80511914713237de894f896da7397965e52134a7.zip |
Fix #1991: Use classtag where available in unapply
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Applications.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala index 42c24ffb7..0ed6ed6b4 100644 --- a/compiler/src/dotty/tools/dotc/typer/Applications.scala +++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala @@ -916,7 +916,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic => val result = assignType(cpy.UnApply(tree)(unapplyFn, unapplyImplicits, unapplyPatterns), ownType) unapp.println(s"unapply patterns = $unapplyPatterns") if ((ownType eq selType) || ownType.isError) result - else Typed(result, TypeTree(ownType)) + else tryWithClassTag(Typed(result, TypeTree(ownType)), selType) case tp => val unapplyErr = if (tp.isError) unapplyFn else notAnExtractor(unapplyFn) val typedArgsErr = args mapconserve (typed(_, defn.AnyType)) |