Commit e8117bab6f

William Sengir <william@sengir.com>
2022-03-26 23:47:35
stage2: clean up creation of boolean `Value`s
1 parent 6b5c879
Changed files (1)
src/value.zig
@@ -2026,7 +2026,7 @@ pub const Value = extern union {
         const result_data = try allocator.alloc(Value, ty.vectorLen());
         for (result_data) |*scalar, i| {
             const res_bool = compareScalar(lhs.indexVectorlike(i), op, rhs.indexVectorlike(i), ty.scalarType(), mod);
-            scalar.* = if (res_bool) Value.@"true" else Value.@"false";
+            scalar.* = makeBool(res_bool);
         }
         return Value.Tag.aggregate.create(allocator, result_data);
     }