aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/translate_c.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/translate_c.zig b/test/translate_c.zig
index 3a453b9aa8..3fad7f8fe5 100644
--- a/test/translate_c.zig
+++ b/test/translate_c.zig
@@ -4129,4 +4129,10 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
\\ }) != 0) {}
\\}
});
+
+ cases.add("macro using argument as struct name is not translated",
+ \\#define FOO(x) struct x
+ , &[_][]const u8{
+ \\pub const FOO = @compileError("unable to translate macro: untranslatable usage of arg `x`");
+ });
}