Skip to content

Commit

Permalink
TypedTreeCopier#Select: don't use unstable prefixes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
smarter committed Nov 22, 2016
1 parent 574a53f commit 46f482e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/ast/tpd.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 46f482e

Please sign in to comment.