GNOME Bugzilla – Bug 670248
Struct member of array type init problem
Last modified: 2017-03-09 21:53:28 UTC
vala consumes expressions like this: const Demo[] testgtk_demos = { { "Application main window", "appwindow.c", do_appwindow, null }, { "Assistant", "assistant.c", do_assistant, null }, { "Entry", null, null, children} }; const Demo[] children = { { "Entry Buffer", "entry_buffer.c", do_assistant, null }, { "Entry Completion", "entry_completion.c", do_assistant, null }, { "Search Entry", "search_entry.c", do_assistant, null } }; but it displays errors: ** (valac:5773): CRITICAL **: vala_ccode_function_add_declaration: assertion `self != NULL' failed ** (valac:5773): CRITICAL **: vala_ccode_function_add_assignment: assertion `self != NULL' failed when I try to feed it with this: const Demo[] testgtk_demos = { { "Application main window", "appwindow.c", do_appwindow, null }, { "Assistant", "assistant.c", do_assistant, null }, { "Entry", null, null, { { "Entry Buffer", "entry_buffer.c", do_assistant, null }, { "Entry Completion", "entry_completion.c", do_assistant, null }, { "Search Entry", "search_entry.c", do_assistant, null } } } };
Created attachment 207811 [details] demo.vala
*** This bug has been marked as a duplicate of bug 741491 ***