Fix in Parser>>unaryExpressionFor:
Set original source position for an unary node even if it gets
folded to a constant. Fixes crash of cobertura coverage writer
for MT2.
--- a/Parser.st Thu Aug 29 20:22:03 2013 +0200
+++ b/Parser.st Fri Aug 30 14:08:02 2013 +0200
@@ -8164,11 +8164,11 @@
"/ create the expression before (corrector may need it)
expr := UnaryNode receiver:receiver selector:sel fold:foldConstants.
+ expr startPosition: receiver startPosition endPosition: pos2.
"/ attention: may have been optimized (Character return -> const!!
expr isMessage ifTrue:[
expr selectorPosition:pos.
- expr startPosition: receiver startPosition endPosition: pos2.
sel := self selectorCheck:sel for:receiver position:pos to:pos2.
@@ -8193,8 +8193,8 @@
].
^ receiver
- "Modified: / 28-07-2011 / 10:09:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 19-01-2012 / 10:46:35 / cg"
+ "Modified: / 30-08-2013 / 13:02:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
variable
@@ -11715,11 +11715,11 @@
!Parser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.787 2013-08-29 18:22:03 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.788 2013-08-30 12:08:02 vrany Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.787 2013-08-29 18:22:03 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.788 2013-08-30 12:08:02 vrany Exp $'
!
version_SVN