diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-10-26 13:46:27 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-10-26 13:46:27 -0700 |
| commit | c6b3d06535f4227541c13fe75da347a485abdb4f (patch) | |
| tree | 8f0a730e1dc7619168a81d2cd4521db1e7a1b4b6 /src/value.zig | |
| parent | 6df26a37d13d21be061a1cccd39dd17e46a81322 (diff) | |
| download | zig-c6b3d06535f4227541c13fe75da347a485abdb4f.tar.gz zig-c6b3d06535f4227541c13fe75da347a485abdb4f.zip | |
Sema: improved C pointers and casting
* C pointer types always have allowzero set to true but they omit the
word allowzero when printed.
* Implement coercion from C pointers to other pointers.
* Implement in-memory coercion for slices and pointer-like optionals.
* Make slicing a C pointer drop the allowzero bit.
* Value representation for pointer-like optionals is now allowed to use
pointer tag values in addition to the `opt_payload` tag.
Diffstat (limited to 'src/value.zig')
| -rw-r--r-- | src/value.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/value.zig b/src/value.zig index 19c2a73666..382aeeedf7 100644 --- a/src/value.zig +++ b/src/value.zig @@ -1819,7 +1819,8 @@ pub const Value = extern union { .unreachable_value => unreachable, .inferred_alloc => unreachable, .inferred_alloc_comptime => unreachable, - else => unreachable, + + else => false, }; } |
