diff options
Diffstat (limited to 'test/behavior/export.zig')
| -rw-r--r-- | test/behavior/export.zig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/behavior/export.zig b/test/behavior/export.zig index 3943fd2834..02d455236f 100644 --- a/test/behavior/export.zig +++ b/test/behavior/export.zig @@ -55,3 +55,16 @@ test "exporting with internal linkage" { }; S.foo(); } + +test "exporting using field access" { + const S = struct { + const Inner = struct { + const x: u32 = 5; + }; + comptime { + @export(Inner.x, .{ .name = "foo", .linkage = .Internal }); + } + }; + + _ = S.Inner.x; +} |
