mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Missing error on default values for body with default arguments #2148.
This commit is contained in:
@@ -4094,6 +4094,10 @@ INLINE bool sema_analyse_macro_body(SemaContext *context, Decl **body_parameters
|
||||
ASSERT(param->decl_kind == DECL_VAR);
|
||||
TypeInfo *type_info = type_infoptrzero(param->var.type_info);
|
||||
VarDeclKind kind = param->var.kind;
|
||||
if (param->var.init_expr)
|
||||
{
|
||||
RETURN_SEMA_ERROR(param->var.init_expr, "Body parameters cannot use default values.");
|
||||
}
|
||||
switch (kind)
|
||||
{
|
||||
case VARDECL_PARAM:
|
||||
|
||||
Reference in New Issue
Block a user