From: Daniel Espinosa Date: Mon, 3 Jan 2022 01:49:12 +0000 (-0600) Subject: SwitchLabel: avoid static access to Report X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ddaae054888cbbe81b293c46bc88850047423b4;p=thirdparty%2Fvala.git SwitchLabel: avoid static access to Report --- 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; } }