]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Report error when signal exists more than once in type hierarchy
authorJürg Billeter <j@bitron.ch>
Thu, 15 Oct 2009 19:34:55 +0000 (21:34 +0200)
committerJürg Billeter <j@bitron.ch>
Thu, 15 Oct 2009 19:34:55 +0000 (21:34 +0200)
codegen/valagsignalmodule.vala

index 937ead5026201ff9b5f01a54282c9f7152cadcc1..390cece7e22390b1392094b3c043f5e7b7cd3481 100644 (file)
@@ -162,6 +162,16 @@ internal class Vala.GSignalModule : GObjectModule {
                        return;
                }
 
+               if (cl != null) {
+                       foreach (DataType base_type in cl.get_base_types ()) {
+                               if (SemanticAnalyzer.symbol_lookup_inherited (base_type.data_type, sig.name) is Signal) {
+                                       sig.error = true;
+                                       Report.error (sig.source_reference, "Signals with the same name as a signal in a base type are not supported");
+                                       return;
+                               }
+                       }
+               }
+
                sig.accept_children (codegen);
 
                // declare parameter type