Merge branch 'master' of github.com:Araq/Nimrod
This commit is contained in:
commit
6ce15652d3
16 changed files with 252 additions and 133 deletions
8
tests/compile/mexporta.nim
Normal file
8
tests/compile/mexporta.nim
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# module A
|
||||
import mexportb
|
||||
export mexportb.TMyObject, mexportb.xyz
|
||||
|
||||
export mexportb.q
|
||||
|
||||
proc `$`*(x: TMyObject): string = "my object"
|
||||
|
||||
7
tests/compile/mexportb.nim
Normal file
7
tests/compile/mexportb.nim
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# module B
|
||||
type TMyObject* = object
|
||||
|
||||
const xyz* = 13
|
||||
|
||||
proc q*(x: int): int = 6
|
||||
proc q*(x: string): string = "8"
|
||||
10
tests/compile/texport.nim
Normal file
10
tests/compile/texport.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
discard """
|
||||
output: "my object68"
|
||||
"""
|
||||
|
||||
import mexporta
|
||||
|
||||
# B.TMyObject has been imported implicitly here:
|
||||
var x: TMyObject
|
||||
echo($x, q(0), q"0")
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# iterate over all files with a given filter:
|
||||
|
||||
import
|
||||
os, times
|
||||
"../../lib/pure/os.nim", ../../ lib / pure / times
|
||||
|
||||
proc main(filter: string) =
|
||||
for filename in walkFiles(filter):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue