summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2016-06-08 20:45:11 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2016-06-08 20:45:11 +0200
commitaf71068efce6637a4f13caabf8e49326104fc011 (patch)
tree10267c56f9b6d30a955255f958fdfd1734176cba
parentf2848bdea4cb3f2b809e4247642274de75587a88 (diff)
downloadvala-wip/valaparser.tar.gz
genie: Warn about "const static" declarations where "static" is superfluouswip/valaparser
-rw-r--r--vala/valagenieparser.vala5
1 files changed, 5 insertions, 0 deletions
diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala
index 3c71d92a5..46c600016 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;
}