[vala/wip/valaparser] genie: Warn about "const static" declarations where "static" is superfluous
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/valaparser] genie: Warn about "const static" declarations where "static" is superfluous
- Date: Wed, 8 Jun 2016 18:55:33 +0000 (UTC)
commit af71068efce6637a4f13caabf8e49326104fc011
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Jun 8 20:45:11 2016 +0200
genie: Warn about "const static" declarations where "static" is superfluous
vala/valagenieparser.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala
index 3c71d92..46c6000 100644
--- a/vala/valagenieparser.vala
+++ b/vala/valagenieparser.vala
@@ -2789,6 +2789,11 @@ public class Vala.Genie.Parser : CodeVisitor {
}
set_attributes (c, attrs);
+
+ if (ModifierFlags.STATIC in flags) {
+ Report.warning (c.source_reference, "the modifier `static' is not applicable to
constants");
+ }
+
return c;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]