mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
bugfix:hexadecimal ranges 0x00..0x01
This commit is contained in:
@@ -357,7 +357,7 @@ proc GetNumber(L: var TLexer): TToken =
|
||||
result.base = base16
|
||||
while true:
|
||||
case L.buf[pos]
|
||||
of 'G'..'Z', 'g'..'z', '.':
|
||||
of 'G'..'Z', 'g'..'z':
|
||||
lexMessage(L, errInvalidNumber, result.literal)
|
||||
inc(pos)
|
||||
of '_':
|
||||
|
||||
8
tests/accept/compile/thexrange.nim
Executable file
8
tests/accept/compile/thexrange.nim
Executable file
@@ -0,0 +1,8 @@
|
||||
|
||||
type
|
||||
TArray = array[0x0012..0x0013, int]
|
||||
|
||||
var a: TArray
|
||||
|
||||
echo a[0] #OUT 0
|
||||
|
||||
Reference in New Issue
Block a user