aboutsummaryrefslogtreecommitdiff
path: root/tests/struct_generic_cont/struct_generic_cont.ek
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-01-11 00:52:21 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2025-01-11 00:52:21 +0200
commit2d8d5ffaee9701955828413f844afa1b3767f748 (patch)
tree0eab7acec6f06b3a4da61a8207dace8524810652 /tests/struct_generic_cont/struct_generic_cont.ek
parent2d90cea9adb9a3f73cd5b211a4ed9508b505729f (diff)
downloadek-2d8d5ffaee9701955828413f844afa1b3767f748.tar.gz
ek-2d8d5ffaee9701955828413f844afa1b3767f748.zip
futher struct continuation work
Diffstat (limited to 'tests/struct_generic_cont/struct_generic_cont.ek')
-rw-r--r--tests/struct_generic_cont/struct_generic_cont.ek19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/struct_generic_cont/struct_generic_cont.ek b/tests/struct_generic_cont/struct_generic_cont.ek
new file mode 100644
index 0000000..34c604b
--- /dev/null
+++ b/tests/struct_generic_cont/struct_generic_cont.ek
@@ -0,0 +1,19 @@
+define any[] {}
+typedef ptr {}
+typedef i27 {}
+
+typedef struct[any T] {
+ T a;
+}
+
+continue struct[any T] {
+ do_something(*struct![T] self => T){
+ return self*.a;
+ }
+}
+
+main()
+{
+ mut p = struct![i27]{.a = 1};
+ p.do_something();
+}