diff options
Diffstat (limited to 'tests/struct_generic_cont/struct_generic_cont.ek')
| -rw-r--r-- | tests/struct_generic_cont/struct_generic_cont.ek | 19 |
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(); +} |
