mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
introduce @as builtin for type coercion
This commit also hooks up type coercion (previously called implicit
casting) into the result location mechanism, and additionally hooks up
variable declarations, maintaining the property that:
var a: T = b;
is semantically equivalent to:
var a = @as(T, b);
See #1757
This commit is contained in:
parent
6d28b28ccc
commit
2a6fbbd8fb
4 changed files with 175 additions and 64 deletions
Loading…
Add table
Add a link
Reference in a new issue