aboutsummaryrefslogtreecommitdiff
path: root/tests/struct_priv_trait_cont/struct.ek
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-01-12 13:17:48 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2025-01-12 13:17:48 +0200
commit2d8691cfef92edf31da746668fd2da3c1fa5043c (patch)
tree0da07f8c72a8c842eae1af86eecea11d4fe6549b /tests/struct_priv_trait_cont/struct.ek
parent67af2eead2b9424ba311ef208cd45df839c3efbe (diff)
downloadek-2d8691cfef92edf31da746668fd2da3c1fa5043c.tar.gz
ek-2d8691cfef92edf31da746668fd2da3c1fa5043c.zip
highlight flaws in current unification system
Diffstat (limited to 'tests/struct_priv_trait_cont/struct.ek')
-rw-r--r--tests/struct_priv_trait_cont/struct.ek32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/struct_priv_trait_cont/struct.ek b/tests/struct_priv_trait_cont/struct.ek
new file mode 100644
index 0000000..6c94aaa
--- /dev/null
+++ b/tests/struct_priv_trait_cont/struct.ek
@@ -0,0 +1,32 @@
+pub typedef ptr {};
+pub typedef i27 {};
+
+pub define trait[] {
+ do_something(=> i27);
+}
+
+pub typedef implementer {}
+continue implementer {
+ trait![];
+ do_something(=> i27)
+ {
+ return 0;
+ }
+}
+
+pub typedef struct[trait T] {
+ T a;
+
+ call_something(*struct![T] self)
+ {
+ self*.a.do_something();
+ }
+}
+
+pub some_func()
+{
+ mut p = struct![implementer]{
+ .a = implementer!{}
+ };
+ p.call_something();
+}