aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/struct_llvm.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/behavior/struct_llvm.zig')
-rw-r--r--test/behavior/struct_llvm.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/behavior/struct_llvm.zig b/test/behavior/struct_llvm.zig
index 5c364e183e..5c8159cb0b 100644
--- a/test/behavior/struct_llvm.zig
+++ b/test/behavior/struct_llvm.zig
@@ -66,3 +66,14 @@ test "self-referencing struct via array member" {
x = T{ .children = .{&x} };
try expect(x.children[0] == &x);
}
+
+test "empty struct method call" {
+ const es = EmptyStruct{};
+ try expect(es.method() == 1234);
+}
+const EmptyStruct = struct {
+ fn method(es: *const EmptyStruct) i32 {
+ _ = es;
+ return 1234;
+ }
+};