From fd5489458a0e1a548135c8fec8ec81ac045773a1 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Wed, 3 Dec 2025 22:25:38 +0100 Subject: [PATCH] Additional fix and updated error message. --- src/compiler/parse_global.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/parse_global.c b/src/compiler/parse_global.c index 7c3dad942..dbe6d910b 100644 --- a/src/compiler/parse_global.c +++ b/src/compiler/parse_global.c @@ -3074,7 +3074,6 @@ static inline bool parse_contract_param(ParseContext *c, AstId *docs, AstId **do { case TOKEN_IDENT: case TOKEN_CT_IDENT: - case TOKEN_TYPE_IDENT: case TOKEN_CT_TYPE_IDENT: case TOKEN_HASH_IDENT: ast->contract_stmt.param.name = symstr(c); @@ -3082,8 +3081,10 @@ static inline bool parse_contract_param(ParseContext *c, AstId *docs, AstId **do case TOKEN_ELLIPSIS: ast->contract_stmt.param.name = NULL; break; + case TOKEN_TYPE_IDENT: case TOKEN_CT_CONST_IDENT: case TOKEN_CONST_IDENT: + RETURN_PRINT_ERROR_HERE("This is not a valid parameter name."); default: RETURN_PRINT_ERROR_HERE("Expected a parameter name here."); }