summary refs log tree commit diff stats
path: root/tests/accept
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2010-02-24 01:04:39 +0100
committerAndreas Rumpf <rumpf_a@web.de>2010-02-24 01:04:39 +0100
commitf41bd71e6152174c3b0819c7549fa431e8a01222 (patch)
tree35bec88bad6f84e9551316888744037e8d15e598 /tests/accept
parent6da95ed9ca899db702c6a7b17d2d7db14dbb0de4 (diff)
downloadNim-f41bd71e6152174c3b0819c7549fa431e8a01222.tar.gz
SQLite wrapper
Diffstat (limited to 'tests/accept')
-rw-r--r--tests/accept/compile/mrecmod.nim1
-rw-r--r--tests/accept/compile/mrecmod2.nim9
-rw-r--r--tests/accept/run/mambsys1.nim7
-rw-r--r--tests/accept/run/mambsys2.nim4
-rw-r--r--tests/accept/run/minit.nim2
5 files changed, 23 insertions, 0 deletions
diff --git a/tests/accept/compile/mrecmod.nim b/tests/accept/compile/mrecmod.nim
new file mode 100644
index 000000000..fab9654d5
--- /dev/null
+++ b/tests/accept/compile/mrecmod.nim
@@ -0,0 +1 @@
+import trecmod

diff --git a/tests/accept/compile/mrecmod2.nim b/tests/accept/compile/mrecmod2.nim
new file mode 100644
index 000000000..9557ce729
--- /dev/null
+++ b/tests/accept/compile/mrecmod2.nim
@@ -0,0 +1,9 @@
+# Module B
+import trecmod2  
+
+proc p*(x: trecmod2.T1): trecmod2.T1 =
+  # this works because the compiler has already
+  # added T1 to trecmod2's interface symbol table
+  return x + 1
+  
+
diff --git a/tests/accept/run/mambsys1.nim b/tests/accept/run/mambsys1.nim
new file mode 100644
index 000000000..5472b5ae4
--- /dev/null
+++ b/tests/accept/run/mambsys1.nim
@@ -0,0 +1,7 @@
+import mambsys2 # import TExport

+

+type

+  TExport* = enum x, y, z

+

+proc foo*(x: int) =

+  nil

diff --git a/tests/accept/run/mambsys2.nim b/tests/accept/run/mambsys2.nim
new file mode 100644
index 000000000..395425b86
--- /dev/null
+++ b/tests/accept/run/mambsys2.nim
@@ -0,0 +1,4 @@
+type

+  TExport* = enum x, y, z # exactly the same type!

+

+proc foo*(x: int) = nil

diff --git a/tests/accept/run/minit.nim b/tests/accept/run/minit.nim
new file mode 100644
index 000000000..d3b4b0be1
--- /dev/null
+++ b/tests/accept/run/minit.nim
@@ -0,0 +1,2 @@
+# Test the new initialization for modules

+write(stdout, "Hallo from module! ")