diff options
| author | Justus Klausecker <justus@klausecker.de> | 2025-08-07 13:02:01 +0200 |
|---|---|---|
| committer | Justus Klausecker <justus@klausecker.de> | 2025-08-12 16:33:57 +0200 |
| commit | 05762ca02ff97e7abfe1b52c090663dbf99bd4fc (patch) | |
| tree | 73e60e53611da67db0dd73cbde39aa93d94f44cf /src/Zcu/PerThread.zig | |
| parent | 0ef26d113ae5a8b307a3af76db61706846fea22f (diff) | |
| download | zig-05762ca02ff97e7abfe1b52c090663dbf99bd4fc.tar.gz zig-05762ca02ff97e7abfe1b52c090663dbf99bd4fc.zip | |
address most comments
Diffstat (limited to 'src/Zcu/PerThread.zig')
| -rw-r--r-- | src/Zcu/PerThread.zig | 2 |
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 = .{ |
