Skip to content

sub-union init gives invalid error #432

@bvdberg

Description

@bvdberg
type Foo struct {
    u16 a;
    union {
        u8 b;
        u16 c;
    }
}

const Foo[] Foos = {
    { 1, 10 }, // error: invalid type conversion from 'i32' to '<anonymous>
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions