fixes tmemit regression
This commit is contained in:
parent
a1e97ad4a4
commit
dc956c485a
2 changed files with 29 additions and 1 deletions
|
|
@ -1,7 +1,21 @@
|
|||
discard """
|
||||
output: '''HELLO WORLD'''
|
||||
output: '''HELLO WORLD
|
||||
c_func'''
|
||||
"""
|
||||
|
||||
import macros, strutils
|
||||
|
||||
emit("echo " & '"' & "hello world".toUpper & '"')
|
||||
|
||||
# bug #1025
|
||||
|
||||
macro foo(icname): stmt =
|
||||
let ic = newStrLitNode($icname)
|
||||
result = quote do:
|
||||
proc x* =
|
||||
proc private {.exportc: `ic`.} = discard
|
||||
echo `ic`
|
||||
private()
|
||||
|
||||
foo(c_func)
|
||||
x()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue