Skip to content

when multiple union fields share the same type, allow them to share a body in a switch prong #1107

Description

@andrewrk
constFoo=union(enum) {
One: i32,
Two: bool,
Three: i32,
};
fnbar(f: Foo) void {
switch (f) {
Foo.One, Foo.Three=>|x| { },
Foo.Two=>|b| { },
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThis proposal is planned.proposalThis issue suggests language modifications. If it also has the "accepted" label then it is planned.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions