]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Don't create temp-variable for array concatenation expression f8676a6584d5b67ac76e132061a9df5d92258b0f
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 2 Mar 2020 20:05:38 +0000 (21:05 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 2 Mar 2020 20:05:56 +0000 (21:05 +0100)
Found by scan-build

vala/valaassignment.vala

index 72f150314027cd7e3e0950b5f148047ccaf02a45..abeca56ddfc2b0f74c19db79d645f7549bfb4ee0 100644 (file)
@@ -427,6 +427,8 @@ public class Vala.Assignment : Expression {
                if (binary != null && binary.left.value_type is ArrayType) {
                        if (binary.operator == BinaryOperator.PLUS) {
                                if (left.symbol_reference == binary.left.symbol_reference) {
+                                       // Allow direct access to array variable
+                                       binary.left.lvalue = true;
                                        return true;
                                }
                        }