diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-03-13 19:03:53 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-03-13 21:11:13 +0100 |
commit | 174334b9095be2be79c164bbdea1749dab9e0cbe (patch) | |
tree | 5a6a2113b41b059cf79067ae745ce790046c3fdd /test/files/pos/t5846.scala | |
parent | b7b4f877326acd6a8a24ff60fa1638cc18143c45 (diff) | |
download | scala-174334b9095be2be79c164bbdea1749dab9e0cbe.tar.gz scala-174334b9095be2be79c164bbdea1749dab9e0cbe.tar.bz2 scala-174334b9095be2be79c164bbdea1749dab9e0cbe.zip |
SI-6921 SI-7239 Tread lightly during exploratory typing
When deciding whether an Assign is a named argument or
and assignment expression, or when looking at arguments
that the current selection is applied to in order to
evaluate candidate implicit views, we risk polluting
the tree by setting error types. This happens even
if we are in 'silent' mode; that mode does silence the
error report, but not the side effect on the tree.
This commit adds strategic `duplicate` calls to
address the problem symptomatically.
Duplicating trees and retyping in general reach into
the domain of bugs umbrella-ed under SI-5464, but in
these places we should be safe because the tree is in
the argument position, not somewhere where, for example,
a case class-es synthetic companion object might be
twice entered into the same scope.
Longer term, we'd like to make type checking side effect
free, so we wouldn't need to play whack-a-mole like this.
That idea is tracked under SI-7176.
Diffstat (limited to 'test/files/pos/t5846.scala')
0 files changed, 0 insertions, 0 deletions