aboutsummaryrefslogtreecommitdiff
path: root/lib/std/comptime_string_map.zig
diff options
context:
space:
mode:
authorzooster <r00ster91@proton.me>2022-08-18 18:54:51 +0200
committerGitHub <noreply@github.com>2022-08-18 19:54:51 +0300
commit4055e6055b5c0727f5e85a30760c9bccf525f4de (patch)
tree3295ef3babc22815422ced1f692bc98c9a43972d /lib/std/comptime_string_map.zig
parent2523b443a482d78fd1a31f5e6b0224fec03835e3 (diff)
downloadzig-4055e6055b5c0727f5e85a30760c9bccf525f4de.tar.gz
zig-4055e6055b5c0727f5e85a30760c9bccf525f4de.zip
AstGen: disallow leading zeroes in int literals and int types
This makes `0123` and `u0123` etc. illegal. I'm now confident that this is a good change because I actually caught two C header translation mistakes in `haiku.zig` with this. Clearly, `0123` being octal in C (TIL) can cause confusion, and we make this easier to read by requiring `0o` as the prefix and now also disallowing leading zeroes in integers. For consistency and because it looks weird, we disallow it for integer types too (e.g. `u0123`). Fixes #11963 Fixes #12417
Diffstat (limited to 'lib/std/comptime_string_map.zig')
0 files changed, 0 insertions, 0 deletions