diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-05-28 17:29:56 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-28 17:29:56 -0700 |
| commit | 3f5ca3920a58d44a018ff2a2e277e60813e20d5a (patch) | |
| tree | ff156147167ab13852411e5b2e9a6eed51ab88d0 /src/Cache.zig | |
| parent | 54f774f7966e48a8419dbe2d3b37ae974ec03a83 (diff) | |
| download | zig-3f5ca3920a58d44a018ff2a2e277e60813e20d5a.tar.gz zig-3f5ca3920a58d44a018ff2a2e277e60813e20d5a.zip | |
AstGen: properly restore previous state after temporary changes
Before this, if a compile error occurred, it would cause the previous
value for e.g. the function scope to not get reset. If the AstGen
process continued, it would result in a violation of the data
guarantees that it relies on.
This commit takes advantage of defer to ensure the previous value is
always reset, even in the case of an error.
Closes #8920
Diffstat (limited to 'src/Cache.zig')
0 files changed, 0 insertions, 0 deletions
