diff options
| author | gingerBill <bill@gingerbill.org> | 2019-11-20 21:56:37 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-11-20 21:56:37 +0000 |
| commit | 69afa33fa540284bcac9f0541e1badc43704078e (patch) | |
| tree | a2e70fee42de4fc5aa88cf00a5dacbfc73d7e5c0 /src/check_decl.cpp | |
| parent | 44e0e96612fe7f08361ee3014d1230ccd9a2e39d (diff) | |
Fix Implicit Selector Expressions do not work at the global/package scope #484
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")); } |