aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-08-09 22:26:09 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-08-09 22:26:09 +0300
commit0bee8234a52c9399544364e8d26b124cb487ce7c (patch)
treee026b5482d740473c50055f4424eb87b362ddddc /tests
parentaa7ea13840e68abff8e9cf74376a6276f6a99033 (diff)
downloadek-0bee8234a52c9399544364e8d26b124cb487ce7c.tar.gz
ek-0bee8234a52c9399544364e8d26b124cb487ce7c.zip
fix trait expansion
+ Accidentally referenced an owned string, add strdup() + Didn't replace type IDs in ->t2
Diffstat (limited to 'tests')
-rw-r--r--tests/generic.ek7
-rw-r--r--tests/trait_expand.ek12
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/generic.ek b/tests/generic.ek
new file mode 100644
index 0000000..7e17d97
--- /dev/null
+++ b/tests/generic.ek
@@ -0,0 +1,7 @@
+typedef i27 {}
+typedef a[any T] {}
+
+main()
+{
+ a![i27] a;
+}
diff --git a/tests/trait_expand.ek b/tests/trait_expand.ek
index eca1e16..2d9f90d 100644
--- a/tests/trait_expand.ek
+++ b/tests/trait_expand.ek
@@ -5,3 +5,15 @@ define b[] {
define a[] {
a(*a a);
}
+
+typedef c {
+ b![];
+
+ a(*c) {}
+}
+
+main()
+{
+ c c;
+ c.a();
+}