Remove immediate pragma (#11308)
* remove immediate from tests * remove immediate from the compiler
This commit is contained in:
parent
eb471acffb
commit
5b27b263fd
22 changed files with 53 additions and 116 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue