aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-12-29 21:48:09 +0000
committermlugg <mlugg@mlugg.co.uk>2024-12-31 09:55:03 +0000
commit9a70eeeac52f1526b9df45614b86912565e53e54 (patch)
tree9509465bcd10becdf6dff9b49a3682235df246f5 /src/codegen
parent6026a5f217398b202b92a4ecc2e129691bbb3a69 (diff)
downloadzig-9a70eeeac52f1526b9df45614b86912565e53e54.tar.gz
zig-9a70eeeac52f1526b9df45614b86912565e53e54.zip
compiler: ensure local `const`s in comptime scope are comptime-known
This fixes a bug which exposed a compiler implementation detail (ZIR alloc elision). Previously, `const` declarations with a runtime-known value in a comptime scope were permitted only if AstGen was able to elide the alloc in ZIR, since the error was reported by storing to the comptime alloc. This just adds a new instruction to also emit this error when the alloc is elided.
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions