Warn on 'expand_to_tuple' has been replaced with 'expand_values'

This commit is contained in:
gingerBill
2023-02-10 13:17:04 +00:00
parent 162628000f
commit e6239ca3c2
2 changed files with 11 additions and 0 deletions

View File

@@ -6744,6 +6744,10 @@ gb_internal ExprKind check_call_expr(CheckerContext *c, Operand *operand, Ast *c
if (operand->mode == Addressing_Builtin) {
i32 id = operand->builtin_id;
Entity *e = entity_of_node(operand->expr);
if (e != nullptr && e->token.string == "expand_to_tuple") {
warning(operand->expr, "'expand_to_tuple' has been replaced with 'expand_values'");
}
if (!check_builtin_procedure(c, operand, call, id, type_hint)) {
operand->mode = Addressing_Invalid;
operand->type = t_invalid;