From 69afa33fa540284bcac9f0541e1badc43704078e Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 20 Nov 2019 21:56:37 +0000 Subject: [PATCH] Fix Implicit Selector Expressions do not work at the global/package scope #484 --- src/check_decl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")); }