| ... | ... | @@ -3089,12 +3089,10 @@ static TypeTableEntry *analyze_bin_op_expr(CodeGen *g, ImportTableEntry *import, |
| 3089 | 3089 | return resolved_type; |
| 3090 | 3090 | } |
| 3091 | 3091 | |
| 3092 | | bool is_int = false; |
| 3093 | | bool is_float = false; |
| 3094 | 3092 | if (resolved_type->id == TypeTableEntryIdInt || |
| 3095 | 3093 | resolved_type->id == TypeTableEntryIdNumLitInt) |
| 3096 | 3094 | { |
| 3097 | | is_int = true; |
| 3095 | // int |
| 3098 | 3096 | } else if ((resolved_type->id == TypeTableEntryIdFloat || |
| 3099 | 3097 | resolved_type->id == TypeTableEntryIdNumLitFloat) && |
| 3100 | 3098 | (bin_op_type == BinOpTypeAdd || |
| ... | ... | @@ -3103,7 +3101,7 @@ static TypeTableEntry *analyze_bin_op_expr(CodeGen *g, ImportTableEntry *import, |
| 3103 | 3101 | bin_op_type == BinOpTypeDiv || |
| 3104 | 3102 | bin_op_type == BinOpTypeMod)) |
| 3105 | 3103 | { |
| 3106 | | is_float = true; |
| 3104 | // float |
| 3107 | 3105 | } else { |
| 3108 | 3106 | add_node_error(g, node, buf_sprintf("invalid operands to binary expression: '%s' and '%s'", |
| 3109 | 3107 | buf_ptr(&lhs_type->name), buf_ptr(&rhs_type->name))); |