Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal error on preinitialised PNimrodNode variable declaration in recursive macro #15

Closed
ddlsmurf opened this issue Feb 11, 2011 · 1 comment

Comments

@ddlsmurf
Copy link
Contributor

import  macros

macro test*(a: stmt): stmt =
  proc testproc(recurse: int) =
    echo "Thats weird"
    var o : PNimrodNode = nil
    echo "  no its not!"
    o = newNimNode(nnkNone)
    if recurse > 0:
      testproc(recurse - 1)
  testproc(5)

test:
  "hi"

If you remove the = nil, or replace it with newNimNode(nnkNone) it works...

Fails with
Error: test_case_of.nim(6): internal error: evalAux: nkNone

@Araq
Copy link
Member

Araq commented Mar 8, 2011

more fixes for dy(n)lib typo; closed by 9b372f4

ddlsmurf pushed a commit to ddlsmurf/Nimrod that referenced this issue Jan 21, 2012
reactormonk pushed a commit to reactormonk/nim that referenced this issue Apr 7, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants