Chained member initializers are not working
Here is the reproducer:
public class Foo.Base : GLib.Object {
public int x { get; set; default = 0; }
public int y { get; set; default = 0; }
}
public class Foo.Bar : Foo.Base {
construct {
var other = new Foo.Base () {
x = y = 6
};
assert (other.x == 6);
assert (other.y == 6);
assert (x == 0);
assert (y == 0);
}
}
public int main () {
var bar = new Foo.Bar ();
return 0;
}
The issue is that in this case, the assert (other.y == 6)
and assert (y == 0)
are both failing as in x = y = 6
, the x is relative to other by the y is assigned to self.
Edited by Rico Tzschichholz