diff options
| author | gingerBill <bill@gingerbill.org> | 2018-02-17 18:34:14 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-02-17 18:34:14 +0000 |
| commit | 21432ba96efc2622f12b2939a0e5d9c2baa0d2c2 (patch) | |
| tree | e960d1eaf535e4b5a4d89be1dfecd11ed1966aa6 /src/check_stmt.cpp | |
| parent | c341597657d92834209b720efc54011bf0179828 (diff) | |
Clean up range code for switch
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 7d053dee6..a8208b7dd 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -744,9 +744,9 @@ void check_switch_stmt(Checker *c, AstNode *node, u32 mod_flags) { } } - if (a1.mode != Addressing_Invalid && + if (a1.mode != Addressing_Invalid && b1.mode != Addressing_Invalid && lhs.mode == Addressing_Constant && rhs.mode == Addressing_Constant && - !is_type_string(lhs.type) && !is_type_string(rhs.type)) { + is_type_number(lhs.type) && is_type_number(rhs.type)) { ExactValue start = lhs.value; ExactValue end = rhs.value; ExactValue one = exact_value_i64(1); |