diff options
| author | gingerBill <bill@gingerbill.org> | 2018-12-08 11:25:35 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-12-08 11:25:35 +0000 |
| commit | bd62bceca6f43a92618a6d362f186918268d84c1 (patch) | |
| tree | 71650c9496105c6f736ebeb39c4036c1a08ef4cc /src/check_expr.cpp | |
| parent | ff6ec860b35bd4382523998ca2804da84fe2d9f6 (diff) | |
Fix BigInt normalization issue #293
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 86ff4f0cd..12616c9dd 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1647,6 +1647,13 @@ void check_comparison(CheckerContext *c, Operand *x, Operand *y, TokenKind op) { } } } else { + if (is_type_integer(x->type)) { + i64 i = exact_value_to_i64(x->value); + if (i == 0) { + auto bi = x->value.value_integer; + gb_printf_err("%s %d %lld\n", expr_to_string(x->expr), bi.len, bi.d.word); + } + } x->value = exact_value_bool(compare_exact_values(op, x->value, y->value)); } } else { |