| ... | ... | @@ -12760,9 +12760,7 @@ static bool eval_const_expr_implicit_cast(IrAnalyze *ira, IrInst *source_instr, |
| 12760 | 12760 | const_val->type = new_type; |
| 12761 | 12761 | break; |
| 12762 | 12762 | case CastOpIntToFloat: |
| 12763 | | { |
| 12764 | | assert(new_type->id == ZigTypeIdFloat); |
| 12765 | | |
| 12763 | if (new_type->id == ZigTypeIdFloat) { |
| 12766 | 12764 | BigFloat bigfloat; |
| 12767 | 12765 | bigfloat_init_bigint(&bigfloat, &other_val->data.x_bigint); |
| 12768 | 12766 | switch (new_type->data.floating.bit_count) { |
| ... | ... | @@ -12783,9 +12781,13 @@ static bool eval_const_expr_implicit_cast(IrAnalyze *ira, IrInst *source_instr, |
| 12783 | 12781 | default: |
| 12784 | 12782 | zig_unreachable(); |
| 12785 | 12783 | } |
| 12786 | | const_val->special = ConstValSpecialStatic; |
| 12787 | | break; |
| 12784 | } else if (new_type->id == ZigTypeIdComptimeFloat) { |
| 12785 | bigfloat_init_bigint(&const_val->data.x_bigfloat, &other_val->data.x_bigint); |
| 12786 | } else { |
| 12787 | zig_unreachable(); |
| 12788 | 12788 | } |
| 12789 | const_val->special = ConstValSpecialStatic; |
| 12790 | break; |
| 12789 | 12791 | case CastOpFloatToInt: |
| 12790 | 12792 | float_init_bigint(&const_val->data.x_bigint, other_val); |
| 12791 | 12793 | if (new_type->id == ZigTypeIdInt) { |