[vala] Do not report inherited interface implementations as unused
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] Do not report inherited interface implementations as unused
- Date: Tue, 15 Sep 2009 10:03:22 +0000 (UTC)
commit df09c3348f70fbc079af946a979ec6d455c87d8e
Author: Jürg Billeter <j bitron ch>
Date: Tue Sep 15 12:02:31 2009 +0200
Do not report inherited interface implementations as unused
vala/valaclass.vala | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/vala/valaclass.vala b/vala/valaclass.vala
index f88efab..dad8b8a 100644
--- a/vala/valaclass.vala
+++ b/vala/valaclass.vala
@@ -1092,7 +1092,10 @@ public class Vala.Class : ObjectTypeSymbol {
sym = base_class.scope.lookup (m.name);
base_class = base_class.base_class;
}
- if (!(sym is Method)) {
+ if (sym is Method) {
+ // method is used as interface implementation, so it is not unused
+ sym.used = true;
+ } else {
error = true;
Report.error (source_reference, "`%s' does not implement interface method `%s'".printf (get_full_name (), m.get_full_name ()));
}
@@ -1108,7 +1111,10 @@ public class Vala.Class : ObjectTypeSymbol {
sym = base_class.scope.lookup (prop.name);
base_class = base_class.base_class;
}
- if (!(sym is Property)) {
+ if (sym is Property) {
+ // property is used as interface implementation, so it is not unused
+ sym.used = true;
+ } else {
error = true;
Report.error (source_reference, "`%s' does not implement interface property `%s'".printf (get_full_name (), prop.get_full_name ()));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]