diff options
| author | gingerBill <bill@gingerbill.org> | 2020-11-15 23:54:18 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-11-15 23:54:18 +0000 |
| commit | 939878df50cf314dd2cd0e5da737ac93e88b5b25 (patch) | |
| tree | 60bd61992a2447ad6a1c4dc8caf4b336f66b71b9 /src/check_stmt.cpp | |
| parent | 5fafb17d81c2bfb07402e04d34c717a7abf42f84 (diff) | |
Improve logic for x->y() shorthand
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index a480e0fdf..4cafa8df5 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -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; } |