-
Notifications
You must be signed in to change notification settings - Fork 34
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
Generic model do not compile #132
Comments
I dig more into this and it is not a Norm limitation - unless Norm implement its own See nim-lang/Nim#19427 for more info |
Reopening because the current fix devel (nim-lang/Nim#19427) is not sufficient |
Follow up that should fix generic model in nim-lang/Nim#19451. @moigagoo Considering these changes will not land in 1.6.X would you be in favor of a local hasCustomPragma / getCustomPragmaVal fixed (that would be the working devel version) with something like : when (NimMajor, NimMinor) <= (1, 6):
import macros except hasCustomPragma, getCustomPragmaVal
export macros
#TODO fetch current custom pragmas proc from devel macros.nim
else:
import macros
export macros It's not the prettiest but it would allow generic model in Norm to work with latest Nim LTS. |
When trying to use generics with ref object of Mode l Iget a compile time error :
The problem is easy to reproduce :
This happens even if the generic parameters is not a field. I know the error actually comes from
hasCustomPragmas
(you can reproduce outside of norm, so it's not strictly speaking a norm issue) but I was wondering if there was a known solution to this ?The text was updated successfully, but these errors were encountered: