fixes #572
This commit is contained in:
parent
7056ceda67
commit
a17076cf4f
2 changed files with 8 additions and 5 deletions
|
|
@ -409,11 +409,11 @@ proc GetNumber(L: var TLexer): TToken =
|
|||
result.fnumber = parseFloat(result.literal)
|
||||
if result.tokType == tkIntLit: result.tokType = tkFloatLit
|
||||
else:
|
||||
result.iNumber = ParseBiggestInt(result.literal)
|
||||
result.iNumber = parseBiggestInt(result.literal)
|
||||
if (result.iNumber < low(int32)) or (result.iNumber > high(int32)):
|
||||
if result.tokType == tkIntLit:
|
||||
result.tokType = tkInt64Lit
|
||||
elif result.tokType != tkInt64Lit:
|
||||
elif result.tokType in {tkInt8Lit, tkInt16Lit}:
|
||||
lexMessage(L, errInvalidNumber, result.literal)
|
||||
except EInvalidValue:
|
||||
lexMessage(L, errInvalidNumber, result.literal)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
# Test various aspects
|
||||
|
||||
# bug #572
|
||||
var a=12345678901'u64
|
||||
|
||||
var x = (x: 42, y: (a: 8, z: 10))
|
||||
echo x.y
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue