Re-factor: Change AstGen.ResultLoc to be a struct

This re-factor is intended to make it easier to track what kind of
operator/expression consumes a result location, without overloading the
ResultLoc union for this purpose.

This is used in the following commit to keep track of initializer
expressions of `const` variables to avoid popping error traces
pre-maturely. Hopefully this will also be useful for implementing
RLS temporaries in the future.
This commit is contained in:
Cody Tapscott
2022-09-14 17:38:08 -07:00
parent 724d753638
commit 77720e30aa
2 changed files with 861 additions and 851 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,7 @@ test "issue12891" {
try std.testing.expect(i < f);
}
test "nan" {
if (builtin.zig_backend == .stage1) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
const f = comptime std.math.nan(f64);