-
-
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
Consts that call templates cannot evaluate whilst in procedure bodies #13795
Comments
Can repro. |
@awr1 the title needs to be changed, see reduced example below: when true: # D20200508T215154:here gitissue
template fun(): untyped =
var c = 0
c
proc main() =
const c = fun()
main()
|
awr1
changed the title
Cannot evaluate const toSeq() on enums inside proc body
Consts that call templates cannot evaluate whilst in procedure bodies
May 9, 2020
@timotheecour Done |
This was referenced Jun 25, 2020
Merged
this sounds like an exact duplicate of #12172, see #12172 (comment) |
This was referenced Oct 23, 2020
This was referenced Aug 3, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fails with:
However, the following passes compilation:
The text was updated successfully, but these errors were encountered: