aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/generic.ek11
-rw-r--r--tests/trait_expand.ek2
2 files changed, 10 insertions, 3 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};
}
diff --git a/tests/trait_expand.ek b/tests/trait_expand.ek
index 2d9f90d..8ee413e 100644
--- a/tests/trait_expand.ek
+++ b/tests/trait_expand.ek
@@ -14,6 +14,6 @@ typedef c {
main()
{
- c c;
+ c c = c!{};
c.a();
}