Files
Nim/tests/macros/tisexported.nim
nc-x d5840e1e3d Implement isExported for symbols in macros (#11963)
* Implement isExported for macros

* Reimplement isExported using VM callback mechanism

* VM does not support exceptions, use stacktrace() instead.
2019-08-18 11:51:28 +02:00

11 lines
172 B
Nim

import macros
proc t1* = discard
proc t2 = discard
macro check(p1: typed, p2: typed) =
doAssert isExported(p1) == true
doAssert isExported(p2) == false
check t1, t2