Fixes bug 669580.
if (list.target_type.data_type is Struct) {
/* initializer is used as struct initializer */
var st = (Struct) list.target_type.data_type;
+ while (st.base_struct != null) {
+ st = st.base_struct;
+ }
if (list.parent_node is Constant || list.parent_node is Field || list.parent_node is InitializerList) {
var clist = new CCodeInitializerList ();
structs/bug660426.vala \
structs/bug661945.vala \
structs/bug667890.vala \
+ structs/bug669580.vala \
delegates/delegates.vala \
delegates/bug539166.vala \
delegates/bug595610.vala \
--- /dev/null
+struct Foo {
+ int i;
+}
+
+struct Bar : Foo {
+}
+
+void main() {
+ Bar bar = { 0 };
+}
} else if (target_type.data_type is Struct) {
/* initializer is used as struct initializer */
var st = (Struct) target_type.data_type;
+ while (st.base_struct != null) {
+ st = st.base_struct;
+ }
var field_it = st.get_fields ().iterator ();
foreach (Expression e in get_initializers ()) {