summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorSimon Schaefer <mail@antoras.de>2013-11-24 00:07:31 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-11-26 19:02:54 +0100
commit3629b645cc2b1403c51925dd9c696a57008c0ce2 (patch)
treea1943705b83d870e96cd4270707e0be3c03f5f5b /src/compiler
parent696545d53f89d8a764273dacca5c6d3043911722 (diff)
downloadscala-3629b645cc2b1403c51925dd9c696a57008c0ce2.tar.gz
scala-3629b645cc2b1403c51925dd9c696a57008c0ce2.tar.bz2
scala-3629b645cc2b1403c51925dd9c696a57008c0ce2.zip
SI-8005 Fixes NoPositon error for updateDynamic calls
Previously there occurred a NoPosition error when one asks for position information in the AST because no positions were set to the trees created during the transformation for updateDynamic calls. This commit applies range positions to the trees in order to being able to highlight them inside of the scala-ide.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index a18bc5ddcf..b80dcefef8 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -4273,7 +4273,9 @@ trait Typers extends Modes with Adaptations with Tags {
}
else if(dyna.isDynamicallyUpdatable(lhs1)) {
val rhs1 = typed(rhs, EXPRmode | BYVALmode, WildcardType)
- val t = Apply(lhs1, List(rhs1))
+ val t = atPos(lhs1.pos.withEnd(rhs1.pos.endOrPoint)) {
+ Apply(lhs1, List(rhs1))
+ }
dyna.wrapErrors(t, _.typed1(t, mode, pt))
}
else fail()