diff options
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index ebfc29899..45269762e 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -902,7 +902,7 @@ void check_global_variable_decl(CheckerContext *ctx, Entity *e, Ast *type_expr, } Operand o = {}; - check_expr(ctx, &o, init_expr); + check_expr_with_type_hint(ctx, &o, init_expr, e->type); check_init_variable(ctx, e, &o, str_lit("variable declaration")); } |