-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Internal compiler error for proc alias #8935
Comments
It should be possible to do this today as well, but it only makes sense with procs that are non-generic. The generic ones are just "recipes" to instantiate a non-generic one with concrete types, hence it does not make sense to bind it to a runtime variable |
It's still possible, it's just that |
Ah yes, I forgot that assert() is a template and not a plain proc. But maybe we can improve the error message -- internal error is a bit confusing, although the source of the error is mentioned: expr(skTemplate) |
Current devel (0.20.99) produces: |
my PR #11822 fixes this, see test case (works with generics, templates (eg assert), macros (eg echo) etc) |
Currently with the latest Nim devel, this is the error message: I consider this an improved error message. |
If I remember correctly proc alias with const keyword was possible some years ago. Now with const, let or var we get some different internal errors:
The text was updated successfully, but these errors were encountered: