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