diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-05-26 15:49:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-26 15:49:19 -0400 |
| commit | ef42ef9ce8d36d26f91669a61f4c57fd3e4d58d7 (patch) | |
| tree | 2f0d5c4175cf0f01f7e3ebf75cfcec4be31ccc2a /test/compile_errors.zig | |
| parent | dd62f63c04fa21427869abea86bbc5fc090b6562 (diff) | |
| parent | 08b0cae7778ea0946d595df451b9b4a65ff09abd (diff) | |
| download | zig-ef42ef9ce8d36d26f91669a61f4c57fd3e4d58d7.tar.gz zig-ef42ef9ce8d36d26f91669a61f4c57fd3e4d58d7.zip | |
Merge pull request #5440 from kubkon/align-fn-error-wasm
Make align expr on fns a compile error in Wasm
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index b7c8053634..5fe42172ce 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -7445,4 +7445,20 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { , &[_][]const u8{ ":2:75: error: operation caused overflow", }); + + cases.addCase(x: { + var tc = cases.create("align(N) expr function pointers is a compile error", + \\export fn foo() align(1) void { + \\ return; + \\} + , &[_][]const u8{ + "tmp.zig:1:23: error: align(N) expr is not allowed on function prototypes in wasm32/wasm64", + }); + tc.target = std.zig.CrossTarget{ + .cpu_arch = .wasm32, + .os_tag = .freestanding, + .abi = .none, + }; + break :x tc; + }); } |
