After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 670248 - Struct member of array type init problem
Struct member of array type init problem
Status: RESOLVED DUPLICATE of bug 741491
Product: vala
Classification: Core
Component: Structs
0.15.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-16 21:37 UTC by aleck.agakhan
Modified: 2017-03-09 21:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
demo.vala (1.07 KB, application/octet-stream)
2012-02-16 21:39 UTC, aleck.agakhan
Details

Description aleck.agakhan 2012-02-16 21:37:14 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 }
		}
	}
};
Comment 1 aleck.agakhan 2012-02-16 21:39:15 UTC
Created attachment 207811 [details]
demo.vala
Comment 2 Rico Tzschichholz 2017-03-09 21:53:28 UTC

*** This bug has been marked as a duplicate of bug 741491 ***