summaryrefslogtreecommitdiff
path: root/src/ast/bits.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/bits.h')
-rw-r--r--src/ast/bits.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ast/bits.h b/src/ast/bits.h
index 11cf7b06d..0aee50ffe 100644
--- a/src/ast/bits.h
+++ b/src/ast/bits.h
@@ -51,7 +51,8 @@ struct Bits {
WASM_UNREACHABLE();
}
- static Index getEffectiveShifts(Const* amount) {
+ static Index getEffectiveShifts(Expression* expr) {
+ auto* amount = expr->cast<Const>();
if (amount->type == i32) {
return getEffectiveShifts(amount->value.geti32(), i32);
} else if (amount->type == i64) {