rune unsigned mapping

This commit is contained in:
kalsprite
2026-08-15 20:53:03 -07:00
parent 36d0b056a2
commit ae742cb9f3
2 changed files with 19 additions and 0 deletions

View File

@@ -6995,6 +6995,13 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
return false;
}
if (bt->Basic.kind == Basic_rune) {
gbString t = type_to_string(operand->type);
error(operand->expr, "Type %s does not have an unsigned integer mapping for '%.*s'", t, LIT(builtin_name));
gb_string_free(t);
return false;
}
Type *u_type = &basic_types[bt->Basic.kind + 1];
operand->type = u_type;