aboutsummaryrefslogtreecommitdiff
path: root/src/Zcu/PerThread.zig
diff options
context:
space:
mode:
authorJustus Klausecker <justus@klausecker.de>2025-08-07 13:02:01 +0200
committerJustus Klausecker <justus@klausecker.de>2025-08-12 16:33:57 +0200
commit05762ca02ff97e7abfe1b52c090663dbf99bd4fc (patch)
tree73e60e53611da67db0dd73cbde39aa93d94f44cf /src/Zcu/PerThread.zig
parent0ef26d113ae5a8b307a3af76db61706846fea22f (diff)
downloadzig-05762ca02ff97e7abfe1b52c090663dbf99bd4fc.tar.gz
zig-05762ca02ff97e7abfe1b52c090663dbf99bd4fc.zip
address most comments
Diffstat (limited to 'src/Zcu/PerThread.zig')
-rw-r--r--src/Zcu/PerThread.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Zcu/PerThread.zig b/src/Zcu/PerThread.zig
index 0325c915ed..6a86bb76a1 100644
--- a/src/Zcu/PerThread.zig
+++ b/src/Zcu/PerThread.zig
@@ -3675,7 +3675,7 @@ pub fn unionValue(pt: Zcu.PerThread, union_ty: Type, tag: Value, val: Value) All
pub fn aggregateValue(pt: Zcu.PerThread, ty: Type, elems: []const InternPool.Index) Allocator.Error!Value {
for (elems) |elem| {
if (!Value.fromInterned(elem).isUndef(pt.zcu)) break;
- } else { // all-undef
+ } else if (elems.len > 0) { // all-undef
return pt.undefValue(ty);
}
return .fromInterned(try pt.intern(.{ .aggregate = .{