I've found strange bug in the devel branch. Take a look at MWE:
# moduleA.nim
from streams import newStringStream, readData, writeData
from macros import quote
macro bindme*(): untyped =
quote do:
var tst = "sometext"
var ss = newStringStream("anothertext")
ss.writeData(tst[0].addr, 2)
discard ss.readData(tst[0].addr, 2) # <= comment this out to make compilation successful
# moduleB.nim
from moduleA import bindme
bindme()
The command
$ nim c moduleB.nim
produces the error message: Error: attempting to call undeclared routine: 'readData'.
If the highlighted line is commented out the error disappears. On the master branch the compilation successful regardless of the line presence.
Nim version (from devel):
Nim Compiler Version 0.18.1 [Linux: amd64]
Compiled at 2018-05-17
Copyright (c) 2006-2018 by Andreas Rumpf
git hash: 072cd073ba40d05ace580292735b5b385544d3e7
active boot switches: -d:release -d:nativeStackTrace
Nim version (from master):
Nim Compiler Version 0.18.0 [Linux: amd64]
Copyright (c) 2006-2018 by Andreas Rumpf
active boot switches: -d:release -d:nativeStackTrace