fixes #1612
This commit is contained in:
parent
ee9c70e034
commit
9500dfcc2e
4 changed files with 7 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -3,3 +3,5 @@ import mexport2b
|
|||
export mexport2b
|
||||
proc printAbc*() = echo "abc"
|
||||
|
||||
proc foo*() = echo "A.foo"
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
proc printXyz*() = echo "xyz"
|
||||
|
||||
proc foo*(x: int) = echo "B.foo"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# bug #1595
|
||||
# bug #1595, #1612
|
||||
|
||||
import mexport2a
|
||||
|
||||
|
|
@ -8,3 +8,4 @@ proc main() =
|
|||
printXyz()
|
||||
|
||||
main()
|
||||
foo(3)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue