summary refs log tree commit diff stats
path: root/tests/modules/tselfimport.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modules/tselfimport.nim')
-rw-r--r--tests/modules/tselfimport.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/modules/tselfimport.nim b/tests/modules/tselfimport.nim
new file mode 100644
index 000000000..ddb3a5b09
--- /dev/null
+++ b/tests/modules/tselfimport.nim
@@ -0,0 +1,9 @@
+discard """
+  file: "tselfimport.nim"
+  line: 7
+  errormsg: "A module cannot import itself"
+"""
+import strutils as su # guard against regression
+import tselfimport #ERROR
+echo("Hello World")
+