zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 2d8fef5680dc8218596e701f91d918c4aa7215bc (tree)
parent 4e357151a54c9a2f373cef59e2718a61cfbe3658
Author: William Sengir <william@sengir.com>
Date:   Sun, 20 Mar 2022 00:06:23 -0700

stage2: make bool binop AIR return types based on operand type

This allows vector-of-bools operands to return a vector-of-bools.

Diffstat:
Msrc/Air.zig | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Air.zig b/src/Air.zig @@ -904,6 +904,8 @@ pub fn typeOfIndex(air: Air, inst: Air.Inst.Index) Type { .shl_sat, .min, .max, + .bool_and, + .bool_or, => return air.typeOf(datas[inst].bin_op.lhs), .sqrt, @@ -935,8 +937,6 @@ pub fn typeOfIndex(air: Air, inst: Air.Inst.Index) Type { .is_non_err, .is_err_ptr, .is_non_err_ptr, - .bool_and, - .bool_or, => return Type.initTag(.bool), .const_ty => return Type.initTag(.type),