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

Initialization of u16 arrays broken #60

Open
msullivan opened this issue Aug 9, 2020 · 0 comments
Open

Initialization of u16 arrays broken #60

msullivan opened this issue Aug 9, 2020 · 0 comments

Comments

@msullivan
Copy link
Contributor

If we do something like

static list_known_crc: u16[5]  = [ 0xd4b0, 0x3340, 0x6a79, 0xe714, 0xe3c1 ];

with the IR compiler we actually compute the whole thing as a 32-bit array and then try to copy it over. In addition to having the wrong values, this can overwrite other things.

I think it is a type inference issue? Marking one of them as u16 is sufficient to fix it.

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