Skip to content

Commit

Permalink
added tests for global variable declaration syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Hejsil committed May 11, 2019
1 parent b2a196e commit fb3b943
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/stage1/behavior/syntax.zig
Original file line number Diff line number Diff line change
@@ -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 };
Expand Down

0 comments on commit fb3b943

Please sign in to comment.