mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-29 17:34:34 +00:00
Fix Panic with runtime.type_info_base #532
This commit is contained in:
@@ -4175,8 +4175,12 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
|
||||
return false;
|
||||
}
|
||||
Type *t = o.type;
|
||||
if (t == nullptr || t == t_invalid || is_type_polymorphic(operand->type)) {
|
||||
error(ce->args[0], "Invalid argument for 'type_info_of'");
|
||||
if (t == nullptr || t == t_invalid || is_type_polymorphic(t)) {
|
||||
if (is_type_polymorphic(t)) {
|
||||
error(ce->args[0], "Invalid argument for 'type_info_of', unspecialized polymorphic type");
|
||||
} else {
|
||||
error(ce->args[0], "Invalid argument for 'type_info_of'");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
t = default_type(t);
|
||||
|
||||
Reference in New Issue
Block a user