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

Ambiguous call from forward declared procedure created in a macro #12175

PMunch opened this issue Sep 11, 2019 · 1 comment


Copy link

commented Sep 11, 2019

After a bug in nimsuggest was fixed that should keep nimlsp from crashing I tried to build nimlsp on the latest devel. This causes the error:

Error: ambiguous call; both nimlsp.isValid(data: JsonNode, schemaType`gensym1028144: type RequestMessage, traverse: bool, allowExtra: bool) [declared in /home/peter/.nimble/pkgs/jsonschema-0.2.0/jsonschema.nim(360, 12)] and nimlsp.isValid(data: JsonNode, schemaType`gensym1028145: type RequestMessage, traverse: bool, allowExtra: bool) [declared in /home/peter/.nimble/pkgs/jsonschema-0.2.0/jsonschema.nim(367, 12)] match for: (JsonNode, type RequestMessage)

The two procedures point to the macro code that generates them and one is only a forward declaration while the other is the procedure with the body.


This comment has been minimized.

Copy link

commented Sep 11, 2019

The forward declaration uses a different gensym'ed symbol so the compiler thinks you introduced two separate procs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.