Zcu: fix crash when incremental re-analysis of type annotation yields same result

This commit is contained in:
mlugg 2025-01-03 23:47:57 +00:00
parent b4da8eef2a
commit 814491f599
No known key found for this signature in database
GPG Key ID: 3F5B7DCCBF4AF02E

View File

@ -909,7 +909,7 @@ fn analyzeNavVal(pt: Zcu.PerThread, nav_id: InternPool.Nav.Index) Zcu.CompileErr
// Of course, we need to make sure we depend on it properly.
try sema.declareDependency(.{ .nav_ty = nav_id });
try pt.ensureNavTypeUpToDate(nav_id);
break :ty .fromInterned(ip.getNav(nav_id).status.type_resolved.type);
break :ty .fromInterned(ip.getNav(nav_id).typeOf(ip));
} else null;
const final_val: ?Value = if (zir_decl.value_body) |value_body| val: {