aboutsummaryrefslogtreecommitdiff
path: root/src/Type.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-08-11 23:16:06 +0100
committerJacob Young <jacobly0@users.noreply.github.com>2024-08-17 18:50:10 -0400
commit895267c916f874593b0788b198b7de140b6b335b (patch)
treecd1256cc5f48f6bdbc1283bf19bb0f224f45d293 /src/Type.zig
parent2b05e85107dd1c637ab40f8b145b232d18e8d6c6 (diff)
downloadzig-895267c916f874593b0788b198b7de140b6b335b.tar.gz
zig-895267c916f874593b0788b198b7de140b6b335b.zip
frontend: incremental progress
This commit makes more progress towards incremental compilation, fixing some crashes in the frontend. Notably, it fixes the regressions introduced by #20964. It also cleans up the "outdated file root" mechanism, by virtue of deleting it: we now detect outdated file roots just after updating ZIR refs, and re-scan their namespaces.
Diffstat (limited to 'src/Type.zig')
-rw-r--r--src/Type.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Type.zig b/src/Type.zig
index 2e3a493f18..c113e0734e 100644
--- a/src/Type.zig
+++ b/src/Type.zig
@@ -3437,7 +3437,7 @@ pub fn typeDeclSrcLine(ty: Type, zcu: *Zcu) ?u32 {
},
else => return null,
};
- const info = tracked.resolveFull(&zcu.intern_pool);
+ const info = tracked.resolveFull(&zcu.intern_pool) orelse return null;
const file = zcu.fileByIndex(info.file);
assert(file.zir_loaded);
const zir = file.zir;