summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/modules/mmodule_same_proc.nim6
-rw-r--r--tests/modules/mmodule_same_proc_client.nim2
-rw-r--r--tests/modules/tmodule_same_proc.nim9
3 files changed, 17 insertions, 0 deletions
diff --git a/tests/modules/mmodule_same_proc.nim b/tests/modules/mmodule_same_proc.nim
new file mode 100644
index 000000000..5ce56ec11
--- /dev/null
+++ b/tests/modules/mmodule_same_proc.nim
@@ -0,0 +1,6 @@
+
+# the module being the same name as the proc
+# is a requirement to trigger the error
+import mmodule_same_proc_client
+
+proc bar*[T](foo: T): bool = foo.mmodule_same_proc_client()
diff --git a/tests/modules/mmodule_same_proc_client.nim b/tests/modules/mmodule_same_proc_client.nim
new file mode 100644
index 000000000..e36ec42cf
--- /dev/null
+++ b/tests/modules/mmodule_same_proc_client.nim
@@ -0,0 +1,2 @@
+
+proc mmodule_same_proc_client*(x: string): bool = x.len > 0
diff --git a/tests/modules/tmodule_same_proc.nim b/tests/modules/tmodule_same_proc.nim
new file mode 100644
index 000000000..dc4dfd3d6
--- /dev/null
+++ b/tests/modules/tmodule_same_proc.nim
@@ -0,0 +1,9 @@
+
+import mmodule_same_proc
+
+# importing baz causes the error not to trigger
+#import baz
+
+# bug #11188
+
+discard "foo".bar()