diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-04-24 20:07:39 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-04-24 20:24:37 -0700 |
| commit | ab658e32bdfa234b6c33f0718cac7a23fbd4074f (patch) | |
| tree | 40878d73c0a191559605b020d20921d316189f20 /test | |
| parent | 76311aebff0f76dba96f589438957a32c364a011 (diff) | |
| download | zig-ab658e32bdfa234b6c33f0718cac7a23fbd4074f.tar.gz zig-ab658e32bdfa234b6c33f0718cac7a23fbd4074f.zip | |
Sema: fix export with Internal linkage
The Export tables should only be populated with non-internal exports.
Diffstat (limited to 'test')
| -rw-r--r-- | test/behavior/export.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/behavior/export.zig b/test/behavior/export.zig index 5f8ccf02d4..3943fd2834 100644 --- a/test/behavior/export.zig +++ b/test/behavior/export.zig @@ -45,3 +45,13 @@ test "exporting enum type and value" { }; try expect(S.e == .two); } + +test "exporting with internal linkage" { + const S = struct { + fn foo() callconv(.C) void {} + comptime { + @export(foo, .{ .name = "exporting_with_internal_linkage_foo", .linkage = .Internal }); + } + }; + S.foo(); +} |
