2008-01-30 Juerg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala: report error when trying to add
instance fields to interfaces, fixes bug 513152
svn path=/trunk/; revision=929
2008-01-30 Jürg Billeter <j@bitron.ch>
+ * vala/valasemanticanalyzer.vala: report error when trying to add
+ instance fields to interfaces, fixes bug 513152
+
+2008-01-30 Jürg Billeter <j@bitron.ch>
+
* vala/valainterfacewriter.vala: output # for properties transferring
ownership
public override void visit_field (Field! f) {
f.accept_children (this);
+ if (f.instance && f.parent_symbol is Interface) {
+ f.error = true;
+ Report.error (f.source_reference, "Interfaces may not have instance fields");
+ return;
+ }
+
if (!f.is_internal_symbol ()) {
current_source_file.add_type_dependency (f.type_reference, SourceFileDependencyType.HEADER_SHALLOW);
} else {