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

Undeclared field 'kind' for system.NimMode, Conflict with macros 'body' #1

Open
geekrelief opened this issue Dec 25, 2020 · 3 comments

Comments

@geekrelief
Copy link

Hi,

I just installed and tried importing macroutils. Trying to use it in godot-nim.

I ran into this error, when replacing macros with macroutils:

Error: undeclared field: 'kind' for type system.NimNode [type declared in C:\nim\lib\system.nim(2740, 3)]

If I have both of them imported I get:

Error: ambiguous call; both macros.body(someProc: NimNode) [proc declared in C:\nim\lib\core\macros.nim(1237, 6)] and macroutils.body(x: NimNode) [template declared in C:\Users\geekr\.nimble\pkgs\macroutils-1.2.0\macroutils.nim(395, 18)] match for: (NimNode)

I'm compiling with nim devel: 3b963a81

@PMunch
Copy link
Owner

PMunch commented Jan 1, 2021

Ah, it seems like the macros package has added a body proc since macroutils was last updated. You can circumvent this with import macros except body (or the same for macroutils).

@geekrelief
Copy link
Author

Thanks!

@PMunch
Copy link
Owner

PMunch commented Jan 2, 2021

Another option is to fully qualify it when you use it so macroutils.body(myNode)

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