mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Add shorthand flag to determine_type_from_polymorphic
This commit is contained in:
+2
-2
@@ -1240,7 +1240,7 @@ Type *determine_type_from_polymorphic(CheckerContext *ctx, Type *poly_type, Oper
|
|||||||
if (!is_operand_value(operand)) {
|
if (!is_operand_value(operand)) {
|
||||||
if (show_error) {
|
if (show_error) {
|
||||||
gbString pts = type_to_string(poly_type);
|
gbString pts = type_to_string(poly_type);
|
||||||
gbString ots = type_to_string(operand.type);
|
gbString ots = type_to_string(operand.type, true);
|
||||||
defer (gb_string_free(pts));
|
defer (gb_string_free(pts));
|
||||||
defer (gb_string_free(ots));
|
defer (gb_string_free(ots));
|
||||||
error(operand.expr, "Cannot determine polymorphic type from parameter: '%s' to '%s'", ots, pts);
|
error(operand.expr, "Cannot determine polymorphic type from parameter: '%s' to '%s'", ots, pts);
|
||||||
@@ -1253,7 +1253,7 @@ Type *determine_type_from_polymorphic(CheckerContext *ctx, Type *poly_type, Oper
|
|||||||
}
|
}
|
||||||
if (show_error) {
|
if (show_error) {
|
||||||
gbString pts = type_to_string(poly_type);
|
gbString pts = type_to_string(poly_type);
|
||||||
gbString ots = type_to_string(operand.type);
|
gbString ots = type_to_string(operand.type, true);
|
||||||
defer (gb_string_free(pts));
|
defer (gb_string_free(pts));
|
||||||
defer (gb_string_free(ots));
|
defer (gb_string_free(ots));
|
||||||
error(operand.expr, "Cannot determine polymorphic type from parameter: '%s' to '%s'", ots, pts);
|
error(operand.expr, "Cannot determine polymorphic type from parameter: '%s' to '%s'", ots, pts);
|
||||||
|
|||||||
Reference in New Issue
Block a user