diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-09-28 02:33:32 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-09-28 02:33:32 -0400 |
| commit | b581da41f82cd1e19701030bf47675b426608adf (patch) | |
| tree | bbfebb52858935e2e91ffabd8b0c2b02fb58ca27 /test/cases/switch_prong_err_enum.zig | |
| parent | e5fd8efcb60cd0223a7dd5e5825d3b9efc006c2a (diff) | |
| download | zig-b581da41f82cd1e19701030bf47675b426608adf.tar.gz zig-b581da41f82cd1e19701030bf47675b426608adf.zip | |
remove compiler directives
* add `setFnTest`, `setFnVisible`, `setFnStaticEval`,
`setFnNoInline` builtin functions to replace previous
directive functionality
* add `coldcc` and `nakedcc` as keywords which can be used as part
of a function prototype.
* `setDebugSafety` builtin can be used to set debug safety features
at a per block scope level.
* closes #169
Diffstat (limited to 'test/cases/switch_prong_err_enum.zig')
| -rw-r--r-- | test/cases/switch_prong_err_enum.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/cases/switch_prong_err_enum.zig b/test/cases/switch_prong_err_enum.zig index cb8c864357..fb7b2e2832 100644 --- a/test/cases/switch_prong_err_enum.zig +++ b/test/cases/switch_prong_err_enum.zig @@ -14,16 +14,18 @@ enum FormValue { Other: bool, } -#static_eval_enable(false) fn doThing(form_id: u64) -> %FormValue { + @setFnStaticEval(this, false); + return switch (form_id) { 17 => FormValue.Address { %return readOnce() }, else => error.InvalidDebugInfo, } } -#attribute("test") fn switchProngReturnsErrorEnum() { + @setFnTest(this, true); + %%doThing(17); assert(read_count == 1); } |
