vala r904 - in trunk: . vala
- From: rasa svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r904 - in trunk: . vala
- Date: Thu, 24 Jan 2008 13:38:21 +0000 (GMT)
Author: rasa
Date: Thu Jan 24 13:38:21 2008
New Revision: 904
URL: http://svn.gnome.org/viewvc/vala?rev=904&view=rev
Log:
2008-01-24 Raffaele Sandrini <raffaele sandrini ch>
* vala/parser.y: report initializers in struct fields as error
Modified:
trunk/ChangeLog
trunk/vala/parser.y
Modified: trunk/vala/parser.y
==============================================================================
--- trunk/vala/parser.y (original)
+++ trunk/vala/parser.y Thu Jan 24 13:38:21 2008
@@ -3594,6 +3594,13 @@
{
/* skip declarations with errors */
if ($1 != NULL) {
+ /* struct fields must not have initializers */
+ ValaExpression *init = vala_field_get_initializer ($1);
+ if (init != NULL) {
+ ValaSourceReference *src = src(@1);
+ vala_report_error (src, "Unexpected field initializer found");
+ g_object_unref (src);
+ }
vala_struct_add_field (VALA_STRUCT (symbol_stack->data), $1);
g_object_unref ($1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]