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

Regression: sizeof Error: cannot instantiate: 'T' #9868

yglukhov opened this issue Dec 5, 2018 · 1 comment


None yet
2 participants
Copy link

commented Dec 5, 2018

The code used to work with 0.19, but now it doesn't:

proc foo(a: SomeInteger): array[sizeof(a), byte] =
test.nim(1, 39) template/generic instantiation of `sizeof` from here
Projects/nim/lib/system.nim(669, 14) Error: cannot instantiate: 'T'

@Araq Araq closed this in 1711a60 Dec 5, 2018

@Araq Araq added the Regression label Dec 5, 2018


This comment has been minimized.

Copy link
Member Author

commented Dec 9, 2018

Dunno, if I should open another issue instead, but calling foo fails (note, this code is fine in 0.19).

proc foo(a: SomeInteger): array[sizeof(a), byte] =

discard foo(1)
test.nim(4, 12) template/generic instantiation of `foo` from here
test.nim(1, 39) Error: cannot evaluate 'sizeof/alignof' because its type is not defined completely

@yglukhov yglukhov reopened this Dec 9, 2018

@Araq Araq closed this in 4ec4079 Dec 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.