summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala3
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala b/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala
index 35a22a4f2c..af9a45fde5 100644
--- a/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala
@@ -215,7 +215,8 @@ abstract class TreeBrowsers {
case ProgramTree(_) => ()
case UnitTree(_) => ()
case _ =>
- str.append("tree.pos: ").append(t.pos)
+ str.append("tree.id: ").append(t.id)
+ str.append("\ntree.pos: ").append(t.pos)
str.append("\nSymbol: ").append(TreeInfo.symbolText(t))
str.append("\nSymbol owner: ").append(
if ((t.symbol ne null) && t.symbol != NoSymbol)
diff --git a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
index e13b76239b..b3e73333c6 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
@@ -354,7 +354,7 @@ abstract class TreeBuilder {
makeFor(mapName, flatMapName, rest, body))
case ValFrom(pos, pat, rhs) :: Filter(_, test) :: rest =>
makeFor(mapName, flatMapName,
- ValFrom(pos, pat, makeCombination(closurePos(pos), nme.filter, rhs, pat.syntheticDuplicate, test)) :: rest,
+ ValFrom(pos, pat, makeCombination(r2p(rhs.pos.start, pos.point, test.pos.end), nme.filter, rhs, pat.syntheticDuplicate, test)) :: rest,
body)
case ValFrom(pos, pat, rhs) :: rest =>
val valeqs = rest.take(definitions.MaxTupleArity - 1).takeWhile(_.isInstanceOf[ValEq]);