@param name parsing too lenient #2614.

This commit is contained in:
Christoffer Lerno
2025-12-03 21:54:06 +01:00
parent ccffa03de2
commit cf5dd5496a
2 changed files with 3 additions and 2 deletions

View File

@@ -50,6 +50,7 @@
- Fix bug when converting from vector to distinct type of wider vector. #2604
- `$defined(hashmap.init(mem))` causes compiler segfault #2611.
- Reference macro parameters syntax does not error in certain cases. #2612
- @param name parsing too lenient #2614.
### Stdlib changes
- Add `CGFloat` `CGPoint` `CGSize` `CGRect` types to core_foundation (macOS).

View File

@@ -3075,15 +3075,15 @@ 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_CONST_IDENT:
case TOKEN_CT_TYPE_IDENT:
case TOKEN_CONST_IDENT:
case TOKEN_HASH_IDENT:
ast->contract_stmt.param.name = symstr(c);
break;
case TOKEN_ELLIPSIS:
ast->contract_stmt.param.name = NULL;
break;
case TOKEN_CT_CONST_IDENT:
case TOKEN_CONST_IDENT:
default:
RETURN_PRINT_ERROR_HERE("Expected a parameter name here.");
}