aboutsummaryrefslogtreecommitdiff
path: root/src/InternPool.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-08-24 13:44:41 +0100
committerMatthew Lugg <mlugg@mlugg.co.uk>2024-08-24 20:30:52 +0100
commit7d54c62c8a55240bbe144ab03c78573a344598ce (patch)
treef93383d99f058b4cf1aec8a3088c1c9847f138e0 /src/InternPool.zig
parent2d7c26cc66facc401b37c26cb17bbae1da00d170 (diff)
downloadzig-7d54c62c8a55240bbe144ab03c78573a344598ce.tar.gz
zig-7d54c62c8a55240bbe144ab03c78573a344598ce.zip
incremental: fix adding/removing aggregate fields
I don't recall why I put these checks here -- they aren't correct. We can freely recreate a type even if its fields have changed, because we are going to re-do all type resolution. The only conditions for recreations are (a) the ZIR index must not be lost and (b) the number of captures must be the same. These conditions are permissible because if either is violated, we can guarantee that analysis of a valid `zirStructDecl` (etc) will never reference this type (since the ZIR index has just been tracked, and the captures have just been created based on the ZIR). Adds a corresponding test case. Resolves: #21185
Diffstat (limited to 'src/InternPool.zig')
0 files changed, 0 insertions, 0 deletions