Remove immediate pragma (#11308)

* remove immediate from tests
* remove immediate from the compiler
This commit is contained in:
Arne Döring 2019-05-29 22:21:51 +02:00 • committed by Andreas Rumpf
commit 5b27b263fd
22 changed files with 53 additions and 116 deletions

View file

@ -1,6 +1,7 @@
import macros
macro macro_bug*(s: stmt): stmt {.immediate.} =
macro macro_bug*(s: untyped) =
echo s.treeRepr
s.expectKind({nnkProcDef, nnkMethodDef})
var params = s.params
@ -9,9 +10,9 @@ macro macro_bug*(s: stmt): stmt {.immediate.} =
result = newNimNode(nnkProcDef).add(
s.name, s[1], genericParams, params, pragma(s), newEmptyNode())
# don't really do anything
var body = body(s)
# Fails here.
var call = newCall("macro_bug", s.params[1][0])
body.insert(0, call)
result.add(body)
echo "result:"
echo result.repr

View file

@ -1,6 +1,3 @@
discard """
disabled: true
"""
import macro_bug