diff options
Diffstat (limited to 'tests/accept')
-rw-r--r-- | tests/accept/compile/mrecmod.nim | 1 | ||||
-rw-r--r-- | tests/accept/compile/mrecmod2.nim | 9 | ||||
-rw-r--r-- | tests/accept/run/mambsys1.nim | 7 | ||||
-rw-r--r-- | tests/accept/run/mambsys2.nim | 4 | ||||
-rw-r--r-- | tests/accept/run/minit.nim | 2 |
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! ") |