mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
Function referencing in @return? for simplified fault declarations. Check @return? eagerly #2340.
This commit is contained in:
@@ -2463,7 +2463,16 @@ static inline bool sema_call_analyse_func_invocation(SemaContext *context, Decl
|
||||
*any_val = *(any_val->inner_expr);
|
||||
}
|
||||
expr->call_expr.function_contracts = 0;
|
||||
AstId docs = decl->func_decl.docs;
|
||||
AstId docs;
|
||||
if (decl->decl_kind == DECL_FNTYPE)
|
||||
{
|
||||
docs = decl->fntype_decl.docs;
|
||||
}
|
||||
else
|
||||
{
|
||||
docs = decl->func_decl.docs;
|
||||
}
|
||||
|
||||
if (!safe_mode_enabled() || !sema_has_require(docs)) goto SKIP_CONTRACTS;
|
||||
SemaContext temp_context;
|
||||
bool success = false;
|
||||
|
||||
Reference in New Issue
Block a user