From: Daniel Espinosa Date: Sun, 2 Jan 2022 23:31:06 +0000 (-0600) Subject: BinaryExpression: use context when available to avoid report static access X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18c83ba6b9d9e7b76db8d09462f687ff44a6133e;p=thirdparty%2Fvala.git BinaryExpression: use context when available to avoid report static access --- 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;