diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2025-02-05 18:31:39 +0000 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2025-02-05 18:31:39 +0000 |
| commit | 3ce857d0543780e96bfd50d75d53d870ff308fef (patch) | |
| tree | 25ed83292cde880900700a6239dac455a3ffe357 /src/InternPool.zig | |
| parent | f01f1e33c96f0b00db8e036a654c1b3bf8531cd8 (diff) | |
| download | zig-3ce857d0543780e96bfd50d75d53d870ff308fef.tar.gz zig-3ce857d0543780e96bfd50d75d53d870ff308fef.zip | |
Sema: fix incorrectly succeeding type resolution
Resolves: #21436
Diffstat (limited to 'src/InternPool.zig')
| -rw-r--r-- | src/InternPool.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig index 60d24223ce..8f99c9d810 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -4011,7 +4011,7 @@ pub const LoadedStructType = struct { pub fn haveFieldTypes(s: LoadedStructType, ip: *const InternPool) bool { const types = s.field_types.get(ip); - return types.len == 0 or types[0] != .none; + return types.len == 0 or types[types.len - 1] != .none; } pub fn haveFieldInits(s: LoadedStructType, ip: *const InternPool) bool { |
