diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-11-14 23:11:04 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-11-22 01:35:08 +0100 |
commit | 46f482ebda7aceac2a5f3fb885916a13b95907ca (patch) | |
tree | 6aed61cdb52c8ec03c9896ff3b3d466ed2dabbab /compiler/src/dotty/tools/dotc/ast/tpd.scala | |
parent | 574a53f9913ca48c28ea2ea34ab153537ab329de (diff) | |
download | dotty-46f482ebda7aceac2a5f3fb885916a13b95907ca.tar.gz dotty-46f482ebda7aceac2a5f3fb885916a13b95907ca.tar.bz2 dotty-46f482ebda7aceac2a5f3fb885916a13b95907ca.zip |
TypedTreeCopier#Select: don't use unstable prefixes
This manifested itself as a pickling difference in tasty_tools
Note that there are probably more issues in this method, in particular
the old type is reused when `qualifier.tpe eq tree.qualifier.tpe` even
if the `name` is different. But I'm only trying to get the tests to pass
for now.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/ast/tpd.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/ast/tpd.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/ast/tpd.scala b/compiler/src/dotty/tools/dotc/ast/tpd.scala index 44e1cf188..cd6b3fcf2 100644 --- a/compiler/src/dotty/tools/dotc/ast/tpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/tpd.scala @@ -464,7 +464,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { case tree: Select if qualifier.tpe eq tree.qualifier.tpe => tree1.withTypeUnchecked(tree.tpe) case _ => tree.tpe match { - case tpe: NamedType => tree1.withType(tpe.derivedSelect(qualifier.tpe)) + case tpe: NamedType => tree1.withType(tpe.derivedSelect(qualifier.tpe.widenIfUnstable)) case _ => tree1.withTypeUnchecked(tree.tpe) } } |