mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
- @deprecated in function contracts would be processed twice, causing a compilation error despite being correct.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
- Add contract on `any_to_enum_ordinal` and `any_to_int` to improve error when passed an empty any. #2977
|
||||
|
||||
### Fixes
|
||||
None
|
||||
- `@deprecated` in function contracts would be processed twice, causing a compilation error despite being correct.
|
||||
|
||||
## 0.7.10 Change list
|
||||
|
||||
|
||||
@@ -1958,6 +1958,7 @@ static bool parse_element_contract(ParseContext *c, ContractDescription *contrac
|
||||
INLINE void attach_deprecation_from_contract(ParseContext *c, ContractDescription *contract, Decl *decl)
|
||||
{
|
||||
if (contract->deprecated) vec_add(decl->attributes, contract->deprecated);
|
||||
contract->deprecated = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3649,6 +3650,7 @@ Decl *parse_top_level_statement(ParseContext *c, ParseContext **context_out)
|
||||
break;
|
||||
case TOKEN_FN:
|
||||
decl = parse_func_definition(c, &contracts, c->unit->is_interface_file ? FUNC_PARSE_C3I : FUNC_PARSE_REGULAR);
|
||||
|
||||
break;
|
||||
case TOKEN_CT_ASSERT:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user