diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-11 01:26:09 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-11 01:26:09 +0200 |
| commit | 47f1d503ec663f967302b3071177c40c431b3fdb (patch) | |
| tree | b3d3683f2de1c38358b385be5b1691ee39b2d23a /tests/struct_trait_cont/struct_trait_cont.ek | |
| parent | 2d8d5ffaee9701955828413f844afa1b3767f748 (diff) | |
| download | ek-47f1d503ec663f967302b3071177c40c431b3fdb.tar.gz ek-47f1d503ec663f967302b3071177c40c431b3fdb.zip | |
trait implementation in continuation
Diffstat (limited to 'tests/struct_trait_cont/struct_trait_cont.ek')
| -rw-r--r-- | tests/struct_trait_cont/struct_trait_cont.ek | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/struct_trait_cont/struct_trait_cont.ek b/tests/struct_trait_cont/struct_trait_cont.ek new file mode 100644 index 0000000..f8e05c5 --- /dev/null +++ b/tests/struct_trait_cont/struct_trait_cont.ek @@ -0,0 +1,20 @@ +define a[] { + a(); +} + +typedef struct {} +continue struct { + a![]; + a(){} +} + +typedef struct2[a T] { + T elem; +} + +main() +{ + mut p = struct2![struct]{ + .elem = struct!{} + }; +} |
