summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-04-23 06:26:15 -0700
committerPaul Phillips <paulp@improving.org>2012-04-23 06:26:15 -0700
commitf47f0c9708b9276eaa658f9f24f73d8431e227d3 (patch)
treef2c26af87d57e017ea135aad7397bb688f352100 /src
parent3b61d19cdc7a4836aaee92dd45c811808da66e18 (diff)
parentb47189ad06e027c310d93b071fc8bf15d979225d (diff)
downloadscala-f47f0c9708b9276eaa658f9f24f73d8431e227d3.tar.gz
scala-f47f0c9708b9276eaa658f9f24f73d8431e227d3.tar.bz2
scala-f47f0c9708b9276eaa658f9f24f73d8431e227d3.zip
Merge branch 'range-redux' of /scratch/trunk2
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala b/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala
index 88cea2231f..838c7f8abd 100644
--- a/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala
@@ -1020,7 +1020,12 @@ class Foo(x: Other) { x._1 } // no error in this order
override def traverse(t: Tree) {
if (t != EmptyTree && t.pos == NoPosition) {
- t.setPos(pos)
+ t setPos pos
+ // During a recursive descent traversal which prunes when it sees
+ // a position, one can't assign the position and THEN recurse.
+ // Ensuring that all children have compliant range positions.
+ for (t1 <- t ; if t1 ne t)
+ t1 setPos pos.makeTransparent
}
t match {
case Function(_, _) if t.symbol == NoSymbol =>