diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-11 23:23:12 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-11 23:23:12 +0300 |
| commit | d23d03829e5baf947d347f49cc1d7807be6c070b (patch) | |
| tree | f611d1105868f1d253cf15070b55793ed694861b /tests/generic.ek | |
| parent | 3065334aec0f357c88eab144628a798db4a3e5ea (diff) | |
| download | ek-d23d03829e5baf947d347f49cc1d7807be6c070b.tar.gz ek-d23d03829e5baf947d347f49cc1d7807be6c070b.zip | |
initial generics for structs
+ Likely still very much full of bugs
Diffstat (limited to 'tests/generic.ek')
| -rw-r--r-- | tests/generic.ek | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/generic.ek b/tests/generic.ek index 7e17d97..065477e 100644 --- a/tests/generic.ek +++ b/tests/generic.ek @@ -1,7 +1,14 @@ +define any[] {} + typedef i27 {} -typedef a[any T] {} +typedef i9 {} + +typedef a[any T] { + T b; +} main() { - a![i27] a; + a![i27] a = a![i27]{.b = 10}; + a![i9] b = a![i9]{.b = 20 as i9}; } |
