diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-08-23 15:30:57 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-08-23 15:30:57 -0700 |
| commit | bb38931c7146678548f63ae9ef71e534c7598fe3 (patch) | |
| tree | 3169ee6a69165cd9bebfc6676fb8f18d7684f390 /lib/std/debug.zig | |
| parent | d5ef5da5947d24792933847454c84daf1282b29e (diff) | |
| download | zig-bb38931c7146678548f63ae9ef71e534c7598fe3.tar.gz zig-bb38931c7146678548f63ae9ef71e534c7598fe3.zip | |
stage1: `@intToEnum` implicitly does an `@intCast`
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.
Diffstat (limited to 'lib/std/debug.zig')
0 files changed, 0 insertions, 0 deletions
