]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
LocalVariable: avoid static access to Report
authorDaniel Espinosa <esodan@gmail.com>
Mon, 3 Jan 2022 00:48:58 +0000 (18:48 -0600)
committerDaniel Espinosa <esodan@gmail.com>
Mon, 3 Jan 2022 23:51:34 +0000 (17:51 -0600)
vala/valalocalvariable.vala

index 4335a61fe59306b5bf104ad2afacaabd92986b67..33f72fffb2a717bd62e87433cff0df6b671cf212 100644 (file)
@@ -177,7 +177,7 @@ public class Vala.LocalVariable : Variable {
                unowned ArrayType? variable_array_type = variable_type as ArrayType;
                if (variable_array_type != null && variable_array_type.inline_allocated
                    && initializer is ArrayCreationExpression && ((ArrayCreationExpression) initializer).initializer_list == null) {
-                       Report.warning (source_reference, "Inline allocated arrays don't require an explicit instantiation");
+                       context.report.log_warning (source_reference, "Inline allocated arrays don't require an explicit instantiation");
                        initializer = null;
                }
 
@@ -222,7 +222,7 @@ public class Vala.LocalVariable : Variable {
                        } else if (variable_type is EnumValueType && initializer.value_type is IntegerType
                            && (!(initializer is IntegerLiteral) || ((IntegerLiteral) initializer).value != "0")) {
                                //FIXME This will have to be an error in the future?
-                               Report.notice (source_reference, "Assignment: Unsafe conversion from `%s' to `%s'", initializer.value_type.to_string (), variable_type.to_string ());
+                               context.report.log_notice (source_reference, "Assignment: Unsafe conversion from `%s' to `%s'", initializer.value_type.to_string (), variable_type.to_string ());
                        }
 
                        if (variable_array_type != null && variable_array_type.inline_allocated && !variable_array_type.fixed_length && is_initializer_list) {