Skip to content

Initialization of u16 arrays broken #60

@msullivan

Description

@msullivan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions