Commit fb3b943b07

Jimmi Holst Christensen <jimmiholstchristensen@gmail.com>
2019-05-11 20:11:56
added tests for global variable declaration syntax
1 parent b2a196e
Changed files (1)
test
stage1
behavior
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 };