diff options
author | Martin Odersky <odersky@gmail.com> | 2015-03-08 11:45:07 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-03-18 11:15:48 +0100 |
commit | 78ef6bbe9da970afa0af9d086c305eb36db56b8b (patch) | |
tree | d48408b0e2bdabfb3b752ea276ee8463852993aa /src/dotty/tools/dotc/typer/Typer.scala | |
parent | 3d987dfa4904d10878482f2211a0aa3af19cae6f (diff) | |
download | dotty-78ef6bbe9da970afa0af9d086c305eb36db56b8b.tar.gz dotty-78ef6bbe9da970afa0af9d086c305eb36db56b8b.tar.bz2 dotty-78ef6bbe9da970afa0af9d086c305eb36db56b8b.zip |
Harmonize treatment of simplified between typer and unpickler
We got some spurious differences in the types in TemplateParents
because simplification was done in Typer but not in Unpickler.
With the change we get perfect matches for all files in pickleOK
also if we print their types.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index b743ae2de..ceab2fd2b 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -475,7 +475,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit val expr1 = ascribeType(expr, pt) cpy.Block(block)(stats, expr1) withType expr1.tpe // no assignType here because avoid is redundant case _ => - Typed(tree, TypeTree(pt)) + Typed(tree, TypeTree(pt.simplified)) } val leaks = escapingRefs(tree, localSyms) if (leaks.isEmpty) tree |