[vala/1270-remove-static-codecontext-access: 42/44] SwitchLabel: avoid static access to Report
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/1270-remove-static-codecontext-access: 42/44] SwitchLabel: avoid static access to Report
- Date: Mon, 3 Jan 2022 23:53:28 +0000 (UTC)
commit 0ddaae054888cbbe81b293c46bc88850047423b4
Author: Daniel Espinosa <esodan gmail com>
Date: Sun Jan 2 19:49:12 2022 -0600
SwitchLabel: avoid static access to Report
vala/valaswitchlabel.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valaswitchlabel.vala b/vala/valaswitchlabel.vala
index df920d6f1..4d919c4f9 100644
--- a/vala/valaswitchlabel.vala
+++ b/vala/valaswitchlabel.vala
@@ -107,12 +107,12 @@ public class Vala.SwitchLabel : CodeNode {
if (!expression.is_constant ()) {
error = true;
- Report.error (expression.source_reference, "Expression must be constant");
+ context.report.log_error (expression.source_reference, "Expression must be
constant");
return false;
}
if (!expression.value_type.compatible (switch_statement.expression.value_type)) {
error = true;
- Report.error (expression.source_reference, "Cannot convert from `%s' to
`%s'", expression.value_type.to_string (), switch_statement.expression.value_type.to_string ());
+ context.report.log_error (expression.source_reference, "Cannot convert from
`%s' to `%s'", expression.value_type.to_string (), switch_statement.expression.value_type.to_string ());
return false;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]