make_enum(name, variants: []EnumVariant) -> Type mints a nominal enum from a variant list passed as a VALUE, not a hardcoded literal — the open-ended form the channel-result constructors are special cases of. Pure sx over declare/define; no compiler machinery. Because variants is an ordinary comptime value, a non-generic builder can ASSEMBLE it in a local before minting. examples/0620: build_level fills a local array, then make_enum mints Level from it — exercising define decoding a value-arg SLICE (decodeVariantElements' slice branch), vs. the inline .[ … ] array the 0614-0618 examples pass directly. No compiler change (locks existing capability). Suite green (678).
2 lines
2 B
Plaintext
2 lines
2 B
Plaintext
0
|