[vala/1270-remove-static-codecontext-access: 27/44] BinaryExpression: use context when available to avoid report static access
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/1270-remove-static-codecontext-access: 27/44] BinaryExpression: use context when available to avoid report static access
- Date: Mon, 3 Jan 2022 23:53:28 +0000 (UTC)
commit 18c83ba6b9d9e7b76db8d09462f687ff44a6133e
Author: Daniel Espinosa <esodan gmail com>
Date: Sun Jan 2 17:31:06 2022 -0600
BinaryExpression: use context when available to avoid report static access
vala/valabinaryexpression.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valabinaryexpression.vala b/vala/valabinaryexpression.vala
index 24aded2c1..a1336032f 100644
--- a/vala/valabinaryexpression.vala
+++ b/vala/valabinaryexpression.vala
@@ -218,7 +218,7 @@ public class Vala.BinaryExpression : Expression {
DataType local_type = null;
bool cast_non_null = false;
if (left.value_type is NullType && right.value_type != null) {
- Report.warning (left.source_reference, "left operand is always null");
+ context.report.log_warning (left.source_reference, "left operand is always
null");
local_type = right.value_type.copy ();
local_type.nullable = true;
if (!right.value_type.nullable) {
@@ -232,7 +232,7 @@ public class Vala.BinaryExpression : Expression {
}
if (context.experimental_non_null) {
if (!local_type.nullable) {
- Report.warning (left.source_reference, "left operand is never
null");
+ context.report.log_warning (left.source_reference, "left
operand is never null");
if (right.value_type != null && right.value_type.nullable) {
local_type.nullable = true;
cast_non_null = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]