From fb3b943b0767ad8730a4c1a38f224351705f5198 Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Sat, 11 May 2019 20:11:56 +0200 Subject: [PATCH] added tests for global variable declaration syntax --- test/stage1/behavior/syntax.zig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/stage1/behavior/syntax.zig b/test/stage1/behavior/syntax.zig index 451e39614..12df8a431 100644 --- a/test/stage1/behavior/syntax.zig +++ b/test/stage1/behavior/syntax.zig @@ -1,6 +1,14 @@ // Test trailing comma syntax // zig fmt: off +extern var a: c_int; +extern "c" var b: c_int; +export var c: c_int = 0; +threadlocal var d: c_int; +extern threadlocal var e: c_int; +extern "c" threadlocal var f: c_int; +export threadlocal var g: c_int = 0; + const struct_trailing_comma = struct { x: i32, y: i32, }; const struct_no_comma = struct { x: i32, y: i32 }; const struct_fn_no_comma = struct { fn m() void {} y: i32 };