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

Generics: getTypeInst can return an unusable symbol #32

Open
mratsim opened this issue Jan 20, 2021 · 0 comments
Open

Generics: getTypeInst can return an unusable symbol #32

mratsim opened this issue Jan 20, 2021 · 0 comments

Comments

@mratsim
Copy link
Contributor

mratsim commented Jan 20, 2021

getTypeInst can return a symbol that is not the type we expect but an nnkSym that we passed like T or E and cannot be manipulated.

See status-im/nimbus-eth2#2219 writeup 9

  1. Unfixed, the recordFields macro in stew/shims doesn't save instantiated generics and in some cases return the abstract generic type instead of the instantiated one. There is an attempt to monkey patch around that in nim-serialization 82cdd5c.
    It mostly works, except when getTypeInst decides to return a dumb symbol instead of the type we actually want for unknown reason.

Another instance of nim-lang/RFCs#44

@mratsim mratsim changed the title Generics Generics: getTypeInst can return an unusable symbol Jan 20, 2021
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