2008-05-28 Juerg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala:
Report error when declaring a compact class implementing an
interface, patch by Phil Housley
svn path=/trunk/; revision=1463
2008-05-28 Jürg Billeter <j@bitron.ch>
+ * vala/valasemanticanalyzer.vala:
+
+ Report error when declaring a compact class implementing an
+ interface, patch by Phil Housley
+
+2008-05-28 Jürg Billeter <j@bitron.ch>
+
* vapi/glib-2.0.vapi: fix GTypeModule binding
2008-05-28 Jürg Billeter <j@bitron.ch>
cl.accept_children (this);
+ /* compact classes cannot implement interfaces */
+ if (cl.is_compact) {
+ foreach (DataType base_type in cl.get_base_types ()) {
+ if (base_type.data_type is Interface) {
+ cl.error = true;
+ Report.error (cl.source_reference, "compact classes `%s` may not implement interfaces".printf (cl.get_full_name ()));
+ }
+ }
+ }
+
/* gather all prerequisites */
Gee.List<TypeSymbol> prerequisites = new ArrayList<TypeSymbol> ();
foreach (DataType base_type in cl.get_base_types ()) {