From 38f51d81d939dfd98099109ffd75c9000bee513a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Thu, 15 Oct 2009 21:27:08 +0200 Subject: [PATCH] Warn if signal hides member in base class --- vala/valasignal.vala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vala/valasignal.vala b/vala/valasignal.vala index c58e160e..207d8f73 100644 --- a/vala/valasignal.vala +++ b/vala/valasignal.vala @@ -265,6 +265,12 @@ public class Vala.Signal : Member, Lockable { cl.add_hidden_method (default_handler); default_handler.check (analyzer); } + + + if (!external_package && !hides && get_hidden_member () != null) { + Report.warning (source_reference, "%s hides inherited signal `%s'. Use the `new' keyword if hiding was intentional".printf (get_full_name (), get_hidden_member ().get_full_name ())); + } + return !error; } } -- 2.11.4.GIT