Fix shared variable assignment.

This commit is contained in:
Stephen Chung
2022-06-26 18:09:15 +08:00
parent d9875ff81c
commit 0031678cd4
5 changed files with 28 additions and 19 deletions

View File

@@ -578,7 +578,7 @@ fn optimize_stmt(stmt: &mut Stmt, state: &mut OptimizerState, preserve_result: b
// Then check ranges
if value.is::<INT>() && !ranges.is_empty() {
let value = value.as_int().expect("`INT`");
let value = value.as_int().unwrap();
// Only one range or all ranges without conditions
if ranges.len() == 1