summary refs log tree commit diff stats
path: root/tests/modules
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-11-24 12:27:21 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-11-24 12:27:21 +0100
commit01ae0d28d47ef4cdd26e1f1f04e40aa9ae6ffe2b (patch)
tree60dd8b1a2648b82255140d7d012333c93d0fce3f /tests/modules
parentbc9015df50b3d93b6cbd987cecbe4832a1be3f87 (diff)
downloadNim-01ae0d28d47ef4cdd26e1f1f04e40aa9ae6ffe2b.tar.gz
recursive modules are only detected to improve error messages
Diffstat (limited to 'tests/modules')
-rw-r--r--tests/modules/trecmod.nim1
-rw-r--r--tests/modules/trecmod2.nim8
-rw-r--r--tests/modules/tselfimport.nim2
3 files changed, 5 insertions, 6 deletions
diff --git a/tests/modules/trecmod.nim b/tests/modules/trecmod.nim
index c670bec55..5f053bcae 100644
--- a/tests/modules/trecmod.nim
+++ b/tests/modules/trecmod.nim
@@ -2,6 +2,7 @@ discard """
   file: "mrecmod.nim"
   line: 1
   errormsg: "recursive module dependency detected"
+  disabled: true
 """
 # recursive module
 import mrecmod
diff --git a/tests/modules/trecmod2.nim b/tests/modules/trecmod2.nim
index aa88f5e91..03c8cf70d 100644
--- a/tests/modules/trecmod2.nim
+++ b/tests/modules/trecmod2.nim
@@ -1,15 +1,13 @@
 discard """
-  file: "mrecmod2.nim"
-  line: 2
-  errormsg: "recursive module dependency detected"
+  output: "4"
 """
 type
   T1* = int  # Module A exports the type ``T1``
 
 import mrecmod2   # the compiler starts parsing B
-
+# the manual says this should work
 proc main() =
-  var i = p(3) # works because B has been parsed completely here
+  echo p(3) # works because B has been parsed completely here
 
 main()
 
diff --git a/tests/modules/tselfimport.nim b/tests/modules/tselfimport.nim
index b9109deae..ddb3a5b09 100644
--- a/tests/modules/tselfimport.nim
+++ b/tests/modules/tselfimport.nim
@@ -1,7 +1,7 @@
 discard """
   file: "tselfimport.nim"
   line: 7
-  errormsg: "recursive module dependency detected"
+  errormsg: "A module cannot import itself"
 """
 import strutils as su # guard against regression
 import tselfimport #ERROR