summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorFrançois Garillot <francois@garillot.net>2013-06-21 13:49:37 +0200
committerPaul Phillips <paulp@improving.org>2013-07-24 13:13:31 -0700
commitc34b048c2f35ae48dad50cf1b870c8c6dde71fd9 (patch)
tree2cfcbb0bab76dcd662feab074246cee49d85ed11 /src/compiler
parentfc4b464faeb43c3e2917b11a95c4f84481c443f7 (diff)
downloadscala-c34b048c2f35ae48dad50cf1b870c8c6dde71fd9.tar.gz
scala-c34b048c2f35ae48dad50cf1b870c8c6dde71fd9.tar.bz2
scala-c34b048c2f35ae48dad50cf1b870c8c6dde71fd9.zip
[backport] 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')
-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 e92c3e1654..1412bff0ab 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
@@ -248,7 +248,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 */