diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-11-13 03:06:55 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-13 03:06:55 +0000 |
| commit | 8bae70454dabe77dfe7e5344e59ca2180d63af51 (patch) | |
| tree | bfb8f584993bf720414f5ab493b42aadd3c24e72 /test/compile_errors.zig | |
| parent | 32b37e695aa0581b863a395e0a28b7b4aa76c07d (diff) | |
| parent | 41914321b4593e3ed246cadda705e1076ab670d7 (diff) | |
| download | zig-8bae70454dabe77dfe7e5344e59ca2180d63af51.tar.gz zig-8bae70454dabe77dfe7e5344e59ca2180d63af51.zip | |
Merge pull request #3675 from Vexu/atomic-store
Add @atomicStore builtin
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index 47333b7db4..63d7240d42 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -3,6 +3,16 @@ const builtin = @import("builtin"); pub fn addCases(cases: *tests.CompileErrorContext) void { cases.add( + "atomic orderings of atomicStore Acquire or AcqRel", + \\export fn entry() void { + \\ var x: u32 = 0; + \\ @atomicStore(u32, &x, 1, .Acquire); + \\} + , + "tmp.zig:3:30: error: @atomicStore atomic ordering must not be Acquire or AcqRel", + ); + + cases.add( "missing const in slice with nested array type", \\const Geo3DTex2D = struct { vertices: [][2]f32 }; \\pub fn getGeo3DTex2D() Geo3DTex2D { |
