[vala] Report error when signal exists more than once in type hierarchy
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] Report error when signal exists more than once in type hierarchy
- Date: Thu, 15 Oct 2009 19:36:43 +0000 (UTC)
commit 8c9dd5d073986e40744cc9b870d74f59dc6ed183
Author: Jürg Billeter <j bitron ch>
Date: Thu Oct 15 21:34:55 2009 +0200
Report error when signal exists more than once in type hierarchy
codegen/valagsignalmodule.vala | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valagsignalmodule.vala b/codegen/valagsignalmodule.vala
index 937ead5..390cece 100644
--- a/codegen/valagsignalmodule.vala
+++ b/codegen/valagsignalmodule.vala
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]