diff options
author | Vindaar <basti90@gmail.com> | 2018-07-03 01:56:36 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-07-03 01:56:36 +0200 |
commit | 681d8e0749fd4374c3cc904ef27a5f600f3c4bb5 (patch) | |
tree | af870e7fb115ec9c6ccf374b15311ce8cb9eb4e4 /tests/misc/tunsignedmisc.nim | |
parent | 70cf286a220940b86b8f8e5b7209ac55981cf8a8 (diff) | |
download | Nim-681d8e0749fd4374c3cc904ef27a5f600f3c4bb5.tar.gz |
Deprecate 'c', 'C' prefix for octal literals, fixes #8082 (#8178)
* deprecate `0c`, `0C` prefix for octal literals Deprecates the previously allowed syntax of `0c` and `0C` as a prefix for octal literals to bring the literals in line with the behavior of `parseOct` from parseutils. * add `msgKind` arg to `lexMessageLitNum` for deprecation messages * change literal tests to check all valid integer literals Also adds the `tinvaligintegerlit3` test to test for the (still) invalid `0O` prefix.
Diffstat (limited to 'tests/misc/tunsignedmisc.nim')
-rw-r--r-- | tests/misc/tunsignedmisc.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/misc/tunsignedmisc.nim b/tests/misc/tunsignedmisc.nim index fc02eee19..b2a3849cf 100644 --- a/tests/misc/tunsignedmisc.nim +++ b/tests/misc/tunsignedmisc.nim @@ -9,7 +9,7 @@ discard """ # 8 bit let ref1 = 128'u8 shr 7 let hex1 = 0x80'u8 shr 7 -let oct1 = 0c200'u8 shr 7 +let oct1 = 0o200'u8 shr 7 let dig1 = 0b10000000'u8 shr 7 doAssert(ref1 == 1) @@ -20,7 +20,7 @@ doAssert(ref1 == dig1) # 16 bit let ref2 = 32768'u16 shr 15 let hex2 = 0x8000'u16 shr 15 -let oct2 = 0c100000'u16 shr 15 +let oct2 = 0o100000'u16 shr 15 let dig2 = 0b1000000000000000'u16 shr 15 doAssert(ref2 == 1) @@ -31,7 +31,7 @@ doAssert(ref2 == dig2) # 32 bit let ref3 = 2147483648'u32 shr 31 let hex3 = 0x80000000'u32 shr 31 -let oct3 = 0c20000000000'u32 shr 31 +let oct3 = 0o20000000000'u32 shr 31 let dig3 = 0b10000000000000000000000000000000'u32 shr 31 doAssert(ref3 == 1) |