mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 06:38:47 +00:00
Allow check_expr_with_type_hint to allow assignment of types to typeid without requiring typeid_of
This commit is contained in:
+3
-1
@@ -7910,7 +7910,9 @@ void check_expr_with_type_hint(CheckerContext *c, Operand *o, Ast *e, Type *t) {
|
|||||||
err_str = "used as a value";
|
err_str = "used as a value";
|
||||||
break;
|
break;
|
||||||
case Addressing_Type:
|
case Addressing_Type:
|
||||||
err_str = "is not an expression but a type";
|
if (t == nullptr || !is_type_typeid(t)) {
|
||||||
|
err_str = "is not an expression but a type";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case Addressing_Builtin:
|
case Addressing_Builtin:
|
||||||
err_str = "must be called";
|
err_str = "must be called";
|
||||||
|
|||||||
Reference in New Issue
Block a user