[vala/1270-remove-static-codecontext-access: 32/44] LocalVariable: avoid static access to Report




commit 1fe7726b47ae3037a81d3e56d930229ad19d3b33
Author: Daniel Espinosa <esodan gmail com>
Date:   Sun Jan 2 18:48:58 2022 -0600

    LocalVariable: avoid static access to Report

 vala/valalocalvariable.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valalocalvariable.vala b/vala/valalocalvariable.vala
index 4335a61fe..33f72fffb 100644
--- a/vala/valalocalvariable.vala
+++ b/vala/valalocalvariable.vala
@@ -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) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]