]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
SwitchLabel: avoid static access to Report
authorDaniel Espinosa <esodan@gmail.com>
Mon, 3 Jan 2022 01:49:12 +0000 (19:49 -0600)
committerDaniel Espinosa <esodan@gmail.com>
Mon, 3 Jan 2022 23:51:34 +0000 (17:51 -0600)
vala/valaswitchlabel.vala

index df920d6f109d5b9c5291f80072305bf00dea20d3..4d919c4f922fc368d728ef924f0350aa9884ff85 100644 (file)
@@ -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;
                        }
                }