History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-428
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Doug H
Reporter: Doug H
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

Check negative number literals at compile time

Created: 07/Aug/05 12:14 PM   Updated: 21/Oct/05 09:42 PM
Component/s: Parser
Affects Version/s: 0.5.6
Fix Version/s: 0.7.5

Time Tracking:
Not Specified

File Attachments: 1. Text File negative.patch (4 kb)

Issue Links:
dependent
 

Testcase included: yes


 Description  « Hide
This patch checks negative number literals (like -1) at the parser stage, so that invalid values are caught at compile time.
Currently this is only done for negative integers at the normalizestatementmodifiers stage.
This is also important for BOO-1, so that literal processor macros receive sign information ("-" at the beginning of the literal)..

print(-1.0)
print(-1)
print(-1h)
print(- 1.0)
print(-0xAA)

x = 2147483648 //error, value one too big for an int:
xlong = 9223372036854775807L //ok, max value allowed for long



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.