From ae7683934763ed1e99b422c82883a4f0ae642a23 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Thu, 13 Mar 2025 11:03:19 +0100 Subject: [PATCH] Fix @return? parsing. --- src/compiler/parse_global.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/parse_global.c b/src/compiler/parse_global.c index c7b9f21d8..87400a4f0 100644 --- a/src/compiler/parse_global.c +++ b/src/compiler/parse_global.c @@ -2709,7 +2709,7 @@ static inline bool parse_doc_optreturn(ParseContext *c, AstId *docs, AstId **doc Ast **returns = NULL; Ast *ast = ast_new_curr(c, AST_CONTRACT); ast->span = c->prev_span; - advance_and_verify(c, TOKEN_BANG); + advance_and_verify(c, TOKEN_QUESTION); ast->contract_stmt.kind = CONTRACT_OPTIONALS; while (1) {