Code cleanup. Correct deprecation notice on '$or'. Allow "self" param on macro method to be constant.

This commit is contained in:
Christoffer Lerno
2024-09-16 10:40:34 +02:00
parent 54a1819d46
commit 81f1930349
8 changed files with 23 additions and 28 deletions

View File

@@ -3438,9 +3438,9 @@ static bool sema_analyse_macro_method(SemaContext *context, Decl *decl)
}
if (!sema_is_valid_method_param(context, first_param, parent_type->canonical, false)) return false;
if (first_param->var.kind != VARDECL_PARAM_REF && first_param->var.kind != VARDECL_PARAM)
if (first_param->var.kind != VARDECL_PARAM_CT && first_param->var.kind != VARDECL_PARAM_REF && first_param->var.kind != VARDECL_PARAM)
{
RETURN_SEMA_ERROR(first_param, "The first parameter must be a regular or ref (&) type.");
RETURN_SEMA_ERROR(first_param, "The first parameter must be a compile time, regular or ref (&) type.");
}
return unit_add_method(context, parent_type->canonical, decl);
}