From 45b3531e29c1b596f1be123de94b7c618c92bf8a Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 11 Jan 2025 16:30:39 +0200 Subject: multiple import stuff --- tests/struct_pub_generic_cont/source.mk | 1 + tests/struct_pub_generic_cont/struct.ek | 14 ++++++++++++++ tests/struct_pub_generic_cont/struct_pub_generic_cont.ek | 14 ++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 tests/struct_pub_generic_cont/source.mk create mode 100644 tests/struct_pub_generic_cont/struct.ek create mode 100644 tests/struct_pub_generic_cont/struct_pub_generic_cont.ek (limited to 'tests/struct_pub_generic_cont') 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(); +} -- cgit v1.3