+2007-07-24 Jürg Billeter <j@bitron.ch>
+
+ * vala/parser.y, vala/valainterface.vala: allow private static fields in
+ interfaces, fixes bug 437435
+
2007-07-23 Jürg Billeter <j@bitron.ch>
* vala/valaarray.vala, vala/valaarraylengthfield.vala,
g_object_unref ($1);
}
}
+ | field_declaration
+ {
+ /* skip declarations with errors */
+ if ($1 != NULL) {
+ vala_interface_add_field (VALA_INTERFACE (symbol_stack->data), $1);
+ g_object_unref ($1);
+ }
+ }
| property_declaration
{
/* skip declarations with errors */
private List<TypeReference> prerequisites;
private List<Method> methods;
+ private List<Field> fields;
private List<Property> properties;
private List<Signal> signals;
}
/**
+ * Adds the specified field as a member to this interface. The field
+ * must be private and static.
+ *
+ * @param f a field
+ */
+ public void add_field (Field! f) {
+ // non_null fields not yet supported due to initialization issues
+ f.type_reference.non_null = false;
+ fields.append (f);
+ scope.add (f.name, f);
+ }
+
+ /**
+ * Returns a copy of the list of fields.
+ *
+ * @return list of fields
+ */
+ public List<weak Field> get_fields () {
+ return fields.copy ();
+ }
+
+ /**
* Adds the specified property as a member to this interface.
*
* @param prop a property
m.accept (visitor);
}
+ foreach (Field f in fields) {
+ f.accept (visitor);
+ }
+
foreach (Property prop in properties) {
prop.accept (visitor);
}