-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
acceptedThis proposal is planned.This proposal is planned.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
- implicit cast from tag type of union with comptime known value to union if the payload
for that field is void - implicit cast from union with comptime known value to tag type if the payload for that field is void
const Letter = enum { A, B, C };
const Value = union(Letter) {
A: i32,
B,
C,
};
fn foo(x: Letter) {
}
test "aoeu" {
var x: Value = Letter.B;
foo(x);
}
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.