Merge pull request #7343 from kalsprite/rune_unsigned_mapping

intrinsics.type_integer_to_unsigned(rune) returns f16
This commit is contained in:
Jeroen van Rijn
2026-08-16 12:28:59 +02:00
committed by GitHub
2 changed files with 19 additions and 0 deletions

View File

@@ -7016,6 +7016,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;