authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-05-25 20:41:14-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-05-25 20:41:14-04:00
logc029f4bfc47b5d6d825f7ae7a3f224e9e9d6ce0b
tree9e0bfe44ef6194aed9b61fbd5ee1534b25ca4e11
parent4405897cbd9105fddb512545594f336b597d91e9

trailing comma after var args is not supported


1 files changed, 0 insertions(+), 5 deletions(-)

test/cases/syntax.zig-5
...@@ -34,16 +34,11 @@ fn switch_prongs(x: i32) void {...@@ -34,16 +34,11 @@ fn switch_prongs(x: i32) void {
3434
35const fn_no_comma = fn(i32, i32)void;35const fn_no_comma = fn(i32, i32)void;
36const fn_trailing_comma = fn(i32, i32,)void;36const fn_trailing_comma = fn(i32, i32,)void;
37const fn_vararg_trailing_comma = fn(i32, i32, ...,)void;
3837
39fn fn_calls() void {38fn fn_calls() void {
40 fn add(x: i32, y: i32,) i32 { x + y };39 fn add(x: i32, y: i32,) i32 { x + y };
41 _ = add(1, 2);40 _ = add(1, 2);
42 _ = add(1, 2,);41 _ = add(1, 2,);
43
44 fn swallow(x: ...,) void {};
45 _ = swallow(1,2,3,);
46 _ = swallow();
47}42}
4843
49fn asm_lists() void {44fn asm_lists() void {