diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-10-26 16:10:37 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-10-26 16:10:37 +0100 |
commit | 1d78426a2b172f0b0ba2f04d1f5c51ad75c82ef5 (patch) | |
tree | 7f82f8eed0a1590ecbb830d575ee0f092a2e433e /vala/valabinaryexpression.vala | |
parent | 545121d1322d3f73880b3f14d86d3d7bd976e664 (diff) | |
download | vala-1d78426a2b172f0b0ba2f04d1f5c51ad75c82ef5.tar.gz |
vala: Make use of new printf-like API of Report.*()
Diffstat (limited to 'vala/valabinaryexpression.vala')
-rw-r--r-- | vala/valabinaryexpression.vala | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/vala/valabinaryexpression.vala b/vala/valabinaryexpression.vala index e1732156c..7b9b78214 100644 --- a/vala/valabinaryexpression.vala +++ b/vala/valabinaryexpression.vala @@ -336,12 +336,12 @@ public class Vala.BinaryExpression : Expression { if (left.value_type is FieldPrototype || left.value_type is PropertyPrototype) { error = true; - Report.error (left.source_reference, "Access to instance member `%s' denied".printf (left.symbol_reference.get_full_name ())); + Report.error (left.source_reference, "Access to instance member `%s' denied", left.symbol_reference.get_full_name ()); return false; } if (right.value_type is FieldPrototype || right.value_type is PropertyPrototype) { error = true; - Report.error (right.source_reference, "Access to instance member `%s' denied".printf (right.symbol_reference.get_full_name ())); + Report.error (right.source_reference, "Access to instance member `%s' denied", right.symbol_reference.get_full_name ()); return false; } @@ -429,7 +429,7 @@ public class Vala.BinaryExpression : Expression { if (value_type == null) { error = true; - Report.error (source_reference, "Arithmetic operation not supported for types `%s' and `%s'".printf (left.value_type.to_string (), right.value_type.to_string ())); + Report.error (source_reference, "Arithmetic operation not supported for types `%s' and `%s'", left.value_type.to_string (), right.value_type.to_string ()); return false; } break; @@ -443,7 +443,7 @@ public class Vala.BinaryExpression : Expression { if (value_type == null) { error = true; - Report.error (source_reference, "Arithmetic operation not supported for types `%s' and `%s'".printf (left.value_type.to_string (), right.value_type.to_string ())); + Report.error (source_reference, "Arithmetic operation not supported for types `%s' and `%s'", left.value_type.to_string (), right.value_type.to_string ()); return false; } break; @@ -468,7 +468,7 @@ public class Vala.BinaryExpression : Expression { if (resulting_type == null) { error = true; - Report.error (source_reference, "Relational operation not supported for types `%s' and `%s'".printf (left.value_type.to_string (), right.value_type.to_string ())); + Report.error (source_reference, "Relational operation not supported for types `%s' and `%s'", left.value_type.to_string (), right.value_type.to_string ()); return false; } @@ -510,7 +510,7 @@ public class Vala.BinaryExpression : Expression { if (!right.value_type.compatible (left.value_type) && !left.value_type.compatible (right.value_type)) { - Report.error (source_reference, "Equality operation: `%s' and `%s' are incompatible".printf (right.value_type.to_string (), left.value_type.to_string ())); + Report.error (source_reference, "Equality operation: `%s' and `%s' are incompatible", right.value_type.to_string (), left.value_type.to_string ()); error = true; return false; } @@ -571,23 +571,23 @@ public class Vala.BinaryExpression : Expression { } else if (right.value_type is ArrayType) { if (!left.value_type.compatible (((ArrayType) right.value_type).element_type)) { error = true; - Report.error (source_reference, "Cannot look for `%s' in `%s'".printf (left.value_type.to_string (), right.value_type.to_string ())); + Report.error (source_reference, "Cannot look for `%s' in `%s'", left.value_type.to_string (), right.value_type.to_string ()); } } else { // otherwise require a bool contains () method var contains_method = right.value_type.get_member ("contains") as Method; if (contains_method == null) { - Report.error (source_reference, "`%s' does not have a `contains' method".printf (right.value_type.to_string ())); + Report.error (source_reference, "`%s' does not have a `contains' method", right.value_type.to_string ()); error = true; return false; } if (contains_method.get_parameters ().size != 1) { - Report.error (source_reference, "`%s' must have one parameter".printf (contains_method.get_full_name ())); + Report.error (source_reference, "`%s' must have one parameter", contains_method.get_full_name ()); error = true; return false; } if (!contains_method.return_type.compatible (context.analyzer.bool_type)) { - Report.error (source_reference, "`%s' must return a boolean value".printf (contains_method.get_full_name ())); + Report.error (source_reference, "`%s' must return a boolean value", contains_method.get_full_name ()); error = true; return false; } |