| ... | @@ -2388,7 +2388,7 @@ fn transCCast( | ... | @@ -2388,7 +2388,7 @@ fn transCCast( |
| 2388 | } | 2388 | } |
| 2389 | if (!cIsFloating(src_type) and cIsFloating(dst_type)) { | 2389 | if (!cIsFloating(src_type) and cIsFloating(dst_type)) { |
| 2390 | var rhs = expr; | 2390 | var rhs = expr; |
| 2391 | if (qualTypeIsBoolean(src_type)) rhs = try Tag.int_from_bool.create(c.arena, expr); | 2391 | if (qualTypeIsBoolean(src_type) or isBoolRes(rhs)) rhs = try Tag.int_from_bool.create(c.arena, expr); |
| 2392 | // @as(dest_type, @floatFromInt(val)) | 2392 | // @as(dest_type, @floatFromInt(val)) |
| 2393 | return Tag.as.create(c.arena, .{ | 2393 | return Tag.as.create(c.arena, .{ |
| 2394 | .lhs = dst_node, | 2394 | .lhs = dst_node, |