diff options
| author | Veikka Tuominen <git@vexu.eu> | 2023-01-16 14:16:47 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2023-01-17 20:28:43 +0200 |
| commit | 8b35f09f4ae29eb2768d47e8a8bae0f4131d6bad (patch) | |
| tree | ef55b1531dcc83b33e76f71847d88c57f13d56ea /src | |
| parent | 6b037bad590bd6c319af336b6d3017c33d6834ba (diff) | |
| download | zig-8b35f09f4ae29eb2768d47e8a8bae0f4131d6bad.tar.gz zig-8b35f09f4ae29eb2768d47e8a8bae0f4131d6bad.zip | |
Sema: resolve lazy values in switch prong items
Closes #14330
Diffstat (limited to 'src')
| -rw-r--r-- | src/Sema.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index 4e479d263a..21e6fd14be 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -11288,6 +11288,7 @@ fn resolveSwitchItemVal( // Only if we know for sure we need to report a compile error do we resolve the // full source locations. if (sema.resolveConstValue(block, .unneeded, item, "")) |val| { + try sema.resolveLazyValue(val); return TypedValue{ .ty = item_ty, .val = val }; } else |err| switch (err) { error.NeededSourceLocation => { |
