This commit is contained in:
Araq 2014-11-06 01:53:57 +01:00
commit 9500dfcc2e
4 changed files with 7 additions and 3 deletions

View file

@ -1943,8 +1943,7 @@ proc semExport(c: PContext, n: PNode): PNode =
var o: TOverloadIter
var s = initOverloadIter(o, c, a)
if s == nil:
localError(a.info, errGenerated, "invalid expr for 'export': " &
renderTree(a))
localError(a.info, errGenerated, "cannot export: " & renderTree(a))
elif s.kind == skModule:
# forward everything from that module:
strTableAdd(c.module.tab, s)

View file

@ -3,3 +3,5 @@ import mexport2b
export mexport2b
proc printAbc*() = echo "abc"
proc foo*() = echo "A.foo"

View file

@ -1 +1,3 @@
proc printXyz*() = echo "xyz"
proc foo*(x: int) = echo "B.foo"

View file

@ -1,4 +1,4 @@
# bug #1595
# bug #1595, #1612
import mexport2a
@ -8,3 +8,4 @@ proc main() =
printXyz()
main()
foo(3)