zig/test
Andrew Kelley 34eb9f18ac
fix not updating debug info type of optional error sets
There's an unfortunate footgun in the current design of error sets.
The debug info type for every error set is the same as the debug info
type of the global error set, which is essentially an enum forward
declaration. The problem is that when we "replace" the forward
declaration with the final value, once we know all the possible errors,
we have to update the pointers of every error set.

So the footgun is that if you ever copy the debug info type of the
global error set, you have to add the address of the pointer to a list
of pointers that need to be updated once we "replace" the forward
declaration. I activated the footgun when I introduced the optimization
that `?anyerror` types are the same size as `anyerror` types (using 0 as
the null value), because I introduced a pointer copy of the global error
set debug info type, but forgot to add it to the list.

I'm sure that there is a better way to code this, which does not have
the footgun, but this commit contains only a fix, not a reworking of the
logic.

closes #1937
2019-02-09 20:41:26 -05:00
..
stage1 fix not updating debug info type of optional error sets 2019-02-09 20:41:26 -05:00
stage2
standalone std.debug.assert: remove special case for test builds 2019-02-08 18:23:38 -05:00
assemble_and_link.zig
build_examples.zig
cli.zig std.debug.assert: remove special case for test builds 2019-02-08 18:23:38 -05:00
compare_output.zig
compile_errors.zig fix compiler assertion failure when returning value from test 2019-02-08 19:23:46 -05:00
gen_h.zig
runtime_safety.zig implement vector math safety with ext and trunc 2019-02-09 16:24:29 -05:00
tests.zig fix compiler assertion failure when returning value from test 2019-02-08 19:23:46 -05:00
translate_c.zig