Fix failed parsing of ct_assert

This commit is contained in:
Christoffer Lerno
2021-12-04 01:00:33 +01:00
parent 26325f0fd2
commit eb81c00ada

View File

@@ -2294,7 +2294,7 @@ Decl *parse_top_level_statement(Context *context)
case TOKEN_CT_ASSERT:
if (!check_no_visibility_before(context, visibility)) return poisoned_decl;
{
ASSIGN_AST_ELSE(Ast *ast, parse_ct_assert_stmt(context), false);
ASSIGN_AST_ELSE(Ast *ast, parse_ct_assert_stmt(context), poisoned_decl);
decl = decl_new(DECL_CT_ASSERT, ast->span.loc, visibility);
decl->ct_assert_decl = ast;
if (docs)