summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
diff options
context:
space:
mode:
authorFrançois Garillot <francois@garillot.net>2013-06-21 13:49:37 +0200
committerFrançois Garillot <francois@garillot.net>2013-06-24 12:02:46 +0200
commit272b165a57d39529a9eb5996bbba64e0c368e43e (patch)
treea984685d07f1e439e3cc9bdb6ce1ca6b8345b4ac /src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
parentb29e515205581d58d239464daadf37f0f1537519 (diff)
downloadscala-272b165a57d39529a9eb5996bbba64e0c368e43e.tar.gz
scala-272b165a57d39529a9eb5996bbba64e0c368e43e.tar.bz2
scala-272b165a57d39529a9eb5996bbba64e0c368e43e.zip
SI-7569 Fix end position in PostfixSelect tree
introduced in 5b54681: the end position of Postfix operators should take the operator length into account. review by @som-snytt
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
index ec4e932aae..0ef71fa1b5 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
@@ -245,7 +245,7 @@ abstract class TreeBuilder {
/** Tree for `od op`, start is start0 if od.pos is borked. */
def makePostfixSelect(start0: Int, end: Int, od: Tree, op: Name): Tree = {
val start = if (od.pos.isDefined) od.pos.startOrPoint else start0
- atPos(r2p(start, end, end)) { new PostfixSelect(od, op.encode) }
+ atPos(r2p(start, end, end + op.length)) { new PostfixSelect(od, op.encode) }
}
/** A type tree corresponding to (possibly unary) intersection type */