-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
acceptedThis proposal is planned.This proposal is planned.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
Example:
const Id = enum {
A, B,
};
const Foo = union(Id) {
A: A,
B: B,
const A = u8;
const B = void;
};
test "union" {
assert(Foo.A == Id.A); // This should probably return 'u8' instead of Id.A
}
Also, there should probably be some way to refer to definitions with the same symbols as the enum tags even in auto-generated tag unions (and no-tag unions), or be made a compile error (the current state where there are unreachable definitions is the problem imo).
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.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.