diff options
| author | Andrea Orru <andrea@orru.io> | 2018-08-06 01:43:19 -0400 |
|---|---|---|
| committer | Andrea Orru <andrea@orru.io> | 2018-08-06 01:43:19 -0400 |
| commit | d2f5e57b68da0b16e5789ca19045ccbcb4ecfa8d (patch) | |
| tree | e9fa3caec533a0d1e2b434868b2fde1f9240e5c8 /test/cases/syntax.zig | |
| parent | 06614b3fa09954464c2e2f32756cacedc178a282 (diff) | |
| parent | 63a23e848a62d5f167f8d5478de9766cb24aa6eb (diff) | |
| download | zig-d2f5e57b68da0b16e5789ca19045ccbcb4ecfa8d.tar.gz zig-d2f5e57b68da0b16e5789ca19045ccbcb4ecfa8d.zip | |
Merge branch 'master' into zen_stdlib
Diffstat (limited to 'test/cases/syntax.zig')
| -rw-r--r-- | test/cases/syntax.zig | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/test/cases/syntax.zig b/test/cases/syntax.zig index 6c851c0ff3..b497b060c4 100644 --- a/test/cases/syntax.zig +++ b/test/cases/syntax.zig @@ -1,12 +1,11 @@ // Test trailing comma syntax +// zig fmt: off const struct_trailing_comma = struct { x: i32, y: i32, }; const struct_no_comma = struct { x: i32, y: i32 }; -const struct_no_comma_void_type = struct { x: i32, y }; const struct_fn_no_comma = struct { fn m() void {} y: i32 }; const enum_no_comma = enum { A, B }; -const enum_no_comma_type = enum { A, B: i32 }; fn container_init() void { const S = struct { x: i32, y: i32 }; @@ -36,16 +35,11 @@ fn switch_prongs(x: i32) void { const fn_no_comma = fn(i32, i32)void; const fn_trailing_comma = fn(i32, i32,)void; -const fn_vararg_trailing_comma = fn(i32, i32, ...,)void; fn fn_calls() void { fn add(x: i32, y: i32,) i32 { x + y }; _ = add(1, 2); _ = add(1, 2,); - - fn swallow(x: ...,) void {}; - _ = swallow(1,2,3,); - _ = swallow(); } fn asm_lists() void { |
