diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2024-08-13 00:34:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-13 00:34:19 +0200 |
| commit | 02b4bb84915e0359ea085aef0bbb843b48a4b147 (patch) | |
| tree | e211db82f6ac6b585988363f43f61257c587e4ed /src/check_expr.cpp | |
| parent | 0d916a659e1b7f2b439fa3329754e109a131186b (diff) | |
| parent | 2808ecc5b6847ba03439ac14eedb8d0f37ad00b8 (diff) | |
Merge pull request #4072 from laytan/fix-32-bit-math-round
fix type hint propagation for shift
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 2 |
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); |