aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-08-12 23:39:07 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2024-08-12 23:39:07 +0200
commita1d518442aa83e7d71f952e8356c974ff8b74a91 (patch)
tree0b95b29f538116bebf1ad4469a6ad892079a7cde /src/check_expr.cpp
parentb71e0c2e3673b5b712847cf67e9a196a4d2d136b (diff)
fix type hint propogation for shift
Fixes #3856
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 38dc30cfa..e92de2d93 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -3038,7 +3038,7 @@ gb_internal void check_shift(CheckerContext *c, Operand *x, Operand *y, Ast *nod
x->mode = Addressing_Value;
if (type_hint) {
if (is_type_integer(type_hint)) {
- x->type = type_hint;
+ convert_to_typed(c, x, type_hint);
} else {
gbString x_str = expr_to_string(x->expr);
gbString to_type = type_to_string(type_hint);