Fix in Parser>>unaryExpressionFor:
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 30 Aug 2013 14:08:02 +0200
changeset 3305 1c46ca0f443c
parent 3304 d1eb4409e3c8
child 3306 41da3ba696f4
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.
Parser.st
--- 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