mirror of
https://github.com/ziglang/zig.git
synced 2024-12-03 10:28:48 +00:00
ab8f8465a3
When scanDecls happens, we create stub Decl objects that have not been semantically analyzed. When they get referenced, they get semantically analyzed. Before this commit, when they got unreferenced, they were completely deleted, including deleted from the containing Namespace. However, if the update did not cause the containing Namespace to get deleted, for example, if `std.builtin.ExportOptions` is no longer referenced, but `std.builtin` is still referenced, and then `ExportOptions` gets referenced again, the Namespace would be incorrectly missing the Decl, so we get an incorrect "no such member" error. The solution is to, when dealing with a no longer referenced Decl objects during an update, clear them to the state they would be in on a fresh scanDecl, rather than completely deleting them. |
||
---|---|---|
.. | ||
behavior | ||
src | ||
stage1/c_abi | ||
stage2 | ||
standalone | ||
assemble_and_link.zig | ||
behavior.zig | ||
cli.zig | ||
compare_output.zig | ||
compile_errors.zig | ||
gen_h.zig | ||
run_translated_c.zig | ||
runtime_safety.zig | ||
stack_traces.zig | ||
standalone.zig | ||
tests.zig | ||
translate_c.zig |