aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/self_hosted.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/self_hosted.zig b/test/self_hosted.zig
index e621dbf3f2..3bf19b61f5 100644
--- a/test/self_hosted.zig
+++ b/test/self_hosted.zig
@@ -1285,3 +1285,13 @@ fn mangle_string(s: []u8) {
*c += 1;
}
}
+
+#attribute("test")
+fn empty_struct_method_call() {
+ const es = EmptyStruct{};
+ assert(es.method() == 1234);
+}
+struct EmptyStruct {
+ #static_eval_enable(false)
+ fn method(es: EmptyStruct) -> i32 { 1234 }
+}