fixes tmemit regression

This commit is contained in:
Araq 2014-03-26 22:56:56 +01:00
commit dc956c485a
2 changed files with 29 additions and 1 deletions

View file

@ -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()