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

Problem encountered with fauxClosure and distinct type #77

Open
michaelsbradleyjr opened this issue Feb 26, 2021 · 0 comments
Open

Problem encountered with fauxClosure and distinct type #77

michaelsbradleyjr opened this issue Feb 26, 2021 · 0 comments

Comments

@michaelsbradleyjr
Copy link
Contributor

See: https://gist.github.com/michaelsbradleyjr/d4aed98d91a6a4a132274bd66e5af826

L20 triggers a compiler error:

bar.nim(20, 16) Error: type mismatch: got <MyString>
but expected one of:
proc payload_16600094(nameCstr`gensym16591097_16600096: distinct[cstring])
first type mismatch at position: 1
  required type for nameCstr`gensym16591097: distinct cstring
  but expression 'nameCstr`gensym16591097' is of type: MyString

expression: payload_16600094(nameCstr`gensym16591097)

I'm not sure if it's something wrong in my code or an issue with the macro's implementation or something more fundamental with Nim.

Based on the compiler error, it seems the payload proc produced by the macro has distinct[cstring] but needs to have MyString.

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

1 participant