mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
This is a backwards-compatible language change. Previously, `@intToEnum` coerced its integer operand to the integer tag type of the destination enum type, often requiring the callsite to additionally wrap the operand in an `@intCast`. Now, the `@intCast` is implicit, and any integer operand can be passed to `@intToEnum`. The same as before, it is illegal behavior to pass any integer which does not have a corresponding enum tag. |
History
|
|
|---|---|---|
| .. | ||
| docgen.zig | ||
| langref.html.in | ||