diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-15 19:14:58 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-15 19:25:59 +0200 |
| commit | 7eaa051d4dcc3048c46f302997fd2175a983ac0e (patch) | |
| tree | 7734373551b8d0ac87a2857965fbc63067df1006 /tests | |
| parent | 164625327bd057141edf84339d4b43b2a8e2de24 (diff) | |
| download | ek-7eaa051d4dcc3048c46f302997fd2175a983ac0e.tar.gz ek-7eaa051d4dcc3048c46f302997fd2175a983ac0e.zip | |
improve generics expansion
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/callbacks/callbacks.ek | 5 | ||||
| -rw-r--r-- | tests/struct_func_ptr/source.mk | 1 | ||||
| -rw-r--r-- | tests/struct_func_ptr/struct_func_ptr.ek | 14 | ||||
| -rw-r--r-- | tests/struct_priv_trait_cont/source.mk | 2 | ||||
| -rw-r--r-- | tests/trait_multiple_expand/source.mk | 2 |
5 files changed, 20 insertions, 4 deletions
diff --git a/tests/callbacks/callbacks.ek b/tests/callbacks/callbacks.ek index 927c122..9e16627 100644 --- a/tests/callbacks/callbacks.ek +++ b/tests/callbacks/callbacks.ek @@ -1,6 +1,7 @@ typedef i27 {} +typedef ptr {} -do_stuff(^(i27 => i27) proc => i27) +do_stuff(*(i27 => i27) proc => i27) { return proc(20); } @@ -12,5 +13,5 @@ other_proc(i27 a => i27) main() { - do_stuff(other_proc); + do_stuff(other_proc&); } diff --git a/tests/struct_func_ptr/source.mk b/tests/struct_func_ptr/source.mk new file mode 100644 index 0000000..96deda8 --- /dev/null +++ b/tests/struct_func_ptr/source.mk @@ -0,0 +1 @@ +SIMPLE += struct_func_ptr 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(); +} diff --git a/tests/struct_priv_trait_cont/source.mk b/tests/struct_priv_trait_cont/source.mk index cff75f9..5bd36f0 100644 --- a/tests/struct_priv_trait_cont/source.mk +++ b/tests/struct_priv_trait_cont/source.mk @@ -1 +1 @@ -SIMPLE_XFAIL += struct_priv_trait_cont +SIMPLE += struct_priv_trait_cont diff --git a/tests/trait_multiple_expand/source.mk b/tests/trait_multiple_expand/source.mk index f4e9516..6d1bcbb 100644 --- a/tests/trait_multiple_expand/source.mk +++ b/tests/trait_multiple_expand/source.mk @@ -1 +1 @@ -SIMPLE += trait_multiple_expand +SIMPLE_XFAIL += trait_multiple_expand |
