mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-31 10:22:08 +00:00
#4115 Add Suggestion: 'typeid_of(T)'
This commit is contained in:
@@ -1180,11 +1180,15 @@ gb_internal void check_assignment(CheckerContext *c, Operand *operand, Type *typ
|
||||
LIT(article),
|
||||
LIT(context_name));
|
||||
} else {
|
||||
ERROR_BLOCK();
|
||||
error(operand->expr,
|
||||
"Cannot assign '%s', a type, to %.*s%.*s",
|
||||
op_type_str,
|
||||
LIT(article),
|
||||
LIT(context_name));
|
||||
if (type && are_types_identical(type, t_any)) {
|
||||
error_line("\tSuggestion: 'typeid_of(%s)'", expr_str);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user