This resulted in invalid C code:
error: lvalue required as left operand of assignment
Fixes https://gitlab.gnome.org/GNOME/vala/issues/953
cfile.add_type_declaration (new CCodeMacroReplacement.with_expression ("%s(var)".printf (free0_func), macro));
}
+ // FIXME this breaks in our macro, so this should not happen
+ if (cvar is CCodeCastExpression) {
+ cvar = ((CCodeCastExpression) cvar).inner;
+ }
+
ccall = new CCodeFunctionCall (new CCodeIdentifier (free0_func));
ccall.add_argument (cvar);
return ccall;
objects/interface-property-override.vala \
objects/interface-virtual-override.vala \
objects/member-initializer-base-properties.vala \
+ objects/member-initializer-property.vala \
objects/member-initializer-property-owned-setter.vala \
objects/methods.vala \
objects/paramspec.vala \
--- /dev/null
+class Baz {
+}
+
+class Bar : Baz {
+}
+
+class Foo {
+ public Baz baz { get; set; }
+}
+
+void main() {
+ var foo = new Foo () {
+ baz = new Bar ()
+ };
+}