diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-01-07 16:51:46 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-01-07 16:53:13 -0500 |
| commit | 66717db735b9ddac9298bf08fcf95e7e11629fee (patch) | |
| tree | 54dea549c62d851da9269b09eba8e596450ee330 /test/compile_errors.zig | |
| parent | de1f57926f212f18a98884fa8b1d0df7f7bc7f03 (diff) | |
| download | zig-66717db735b9ddac9298bf08fcf95e7e11629fee.tar.gz zig-66717db735b9ddac9298bf08fcf95e7e11629fee.zip | |
replace `%return` with `try`
See #632
better fits the convention of using keywords for control flow
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index ec3ec78664..2963016d50 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -1051,9 +1051,9 @@ pub fn addCases(cases: &tests.CompileErrorContext) { \\export fn entry() -> usize { return @sizeOf(@typeOf(f)); } , ".tmp_source.zig:3:26: error: expected signed integer type, found 'u32'"); - cases.add("%return in function with non error return type", + cases.add("try in function with non error return type", \\export fn f() { - \\ %return something(); + \\ try something(); \\} \\fn something() -> %void { } , @@ -1290,7 +1290,7 @@ pub fn addCases(cases: &tests.CompileErrorContext) { \\pub fn testTrickyDefer() -> %void { \\ defer canFail() %% {}; \\ - \\ defer %return canFail(); + \\ defer try canFail(); \\ \\ const a = maybeInt() ?? return; \\} |
