Improve logic for x->y() shorthand

This commit is contained in:
gingerBill
2020-11-15 23:54:18 +00:00
parent 5fafb17d81
commit 939878df50
5 changed files with 31 additions and 18 deletions
+1 -2
View File
@@ -858,8 +858,7 @@ void check_switch_stmt(CheckerContext *ctx, Ast *node, u32 mod_flags) {
token.pos = ast_token(ss->body).pos;
token.string = str_lit("true");
x.expr = gb_alloc_item(permanent_allocator(), Ast);
x.expr->kind = Ast_Ident;
x.expr = alloc_ast_node(nullptr, Ast_Ident);
x.expr->Ident.token = token;
}