aboutsummaryrefslogtreecommitdiff
path: root/src/InternPool.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2025-02-05 18:31:39 +0000
committermlugg <mlugg@mlugg.co.uk>2025-02-05 18:31:39 +0000
commit3ce857d0543780e96bfd50d75d53d870ff308fef (patch)
tree25ed83292cde880900700a6239dac455a3ffe357 /src/InternPool.zig
parentf01f1e33c96f0b00db8e036a654c1b3bf8531cd8 (diff)
downloadzig-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.zig2
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 {