aboutsummaryrefslogtreecommitdiff
path: root/tests/struct_pub_generic_cont
diff options
context:
space:
mode:
Diffstat (limited to 'tests/struct_pub_generic_cont')
-rw-r--r--tests/struct_pub_generic_cont/source.mk1
-rw-r--r--tests/struct_pub_generic_cont/struct.ek14
-rw-r--r--tests/struct_pub_generic_cont/struct_pub_generic_cont.ek14
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/struct_pub_generic_cont/source.mk b/tests/struct_pub_generic_cont/source.mk
new file mode 100644
index 0000000..824c042
--- /dev/null
+++ b/tests/struct_pub_generic_cont/source.mk
@@ -0,0 +1 @@
+SIMPLE += struct_pub_generic_cont
diff --git a/tests/struct_pub_generic_cont/struct.ek b/tests/struct_pub_generic_cont/struct.ek
new file mode 100644
index 0000000..85f1711
--- /dev/null
+++ b/tests/struct_pub_generic_cont/struct.ek
@@ -0,0 +1,14 @@
+pub define any[] {}
+pub typedef i27 {}
+pub typedef struct[any T] {}
+
+/* private definition of some function */
+continue struct[any T] {
+ do_something(){}
+}
+
+pub some_func()
+{
+ mut p = struct![i27]{};
+ p.do_something();
+}
diff --git a/tests/struct_pub_generic_cont/struct_pub_generic_cont.ek b/tests/struct_pub_generic_cont/struct_pub_generic_cont.ek
new file mode 100644
index 0000000..905bdf9
--- /dev/null
+++ b/tests/struct_pub_generic_cont/struct_pub_generic_cont.ek
@@ -0,0 +1,14 @@
+import "struct.ek"
+
+continue struct[any T] {
+ do_something(){}
+}
+
+main()
+{
+ mut p = struct![i27]{};
+ /* should be different from do_something() defined in struct.ek */
+ p.do_something();
+
+ some_func();
+}