A member-access making the wrong assumption of a previous copy resulted
in a double free.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1118
semantic/interface-prerequisite-multiple.test \
semantic/literal-expression.test \
semantic/localvariable-owned-to-unowned.test \
+ semantic/localvariable-var-pointer-initializer.vala \
semantic/localvariable-var-static-access-instance-field.test \
semantic/localvariable-var-static-access-instance-method.test \
semantic/localvariable-var-static-access-instance-property.test \
--- /dev/null
+struct Foo {
+ public string s;
+}
+
+void main () {
+ {
+ Foo foo = { "foo" };
+ var foo_p = &foo;
+ assert (foo_p.s == "foo");
+ }
+}
return false;
}
value_type = pointer_type.base_type;
+ value_type.value_owned = false;
} else {
error = true;
Report.error (source_reference, "Pointer indirection not supported for this expression");