]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
genie: Warn about "const static" declarations where "static" is superfluous
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 8 Jun 2016 18:45:11 +0000 (20:45 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 13 Jun 2016 06:04:02 +0000 (08:04 +0200)
vala/valagenieparser.vala

index 3c71d92a5ce3f25e02a9b49970dba5706a9bd658..46c600016be6b5dc427e55b4fdbe15ed541d092a 100644 (file)
@@ -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;
        }