diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2024-12-29 21:48:09 +0000 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2024-12-31 09:55:03 +0000 |
| commit | 9a70eeeac52f1526b9df45614b86912565e53e54 (patch) | |
| tree | 9509465bcd10becdf6dff9b49a3682235df246f5 /src/codegen/spirv | |
| parent | 6026a5f217398b202b92a4ecc2e129691bbb3a69 (diff) | |
| download | zig-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/spirv')
0 files changed, 0 insertions, 0 deletions
