aboutsummaryrefslogtreecommitdiff
path: root/tests/struct_func_ptr/struct_func_ptr.ek
diff options
context:
space:
mode:
Diffstat (limited to 'tests/struct_func_ptr/struct_func_ptr.ek')
-rw-r--r--tests/struct_func_ptr/struct_func_ptr.ek14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/struct_func_ptr/struct_func_ptr.ek b/tests/struct_func_ptr/struct_func_ptr.ek
new file mode 100644
index 0000000..43da6cc
--- /dev/null
+++ b/tests/struct_func_ptr/struct_func_ptr.ek
@@ -0,0 +1,14 @@
+typedef ptr {}
+typedef i27 {}
+
+typedef struct {
+ *() f;
+}
+
+do_something(){}
+
+main()
+{
+ mut p = struct!{.f = do_something&};
+ p.f();
+}