From: Rico Tzschichholz Date: Wed, 8 Jun 2016 18:15:22 +0000 (+0200) Subject: valaparser: Warn about "static const" declarations where "static" is superfluous X-Git-Tag: 0.33.1~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bbd2a1b416d91d0f830c6a86bea6b99d73b4195a;p=thirdparty%2Fvala.git valaparser: Warn about "static const" declarations where "static" is superfluous --- diff --git a/vala/valaparser.vala b/vala/valaparser.vala index e25eef895..3cbc56178 100644 --- a/vala/valaparser.vala +++ b/vala/valaparser.vala @@ -2572,6 +2572,10 @@ public class Vala.Parser : CodeVisitor { } set_attributes (c, attrs); + if (ModifierFlags.STATIC in flags) { + Report.warning (c.source_reference, "the modifier `static' is not applicable to constants"); + } + parent.add_constant (c); }