Added check against constant declarations

This commit is contained in:
arookas 2016-02-22 20:52:41 -05:00
parent 6fe9de3af5
commit d7ce89ca9a

View file

@ -34,6 +34,9 @@
public override void Compile(sunCompiler compiler) {
var symbol = compiler.Context.DeclareVariable(this);
symbol.Modifiers = Modifiers;
if ((Modifiers & sunSymbolModifiers.Constant) != 0) {
throw new sunInvalidModifierException(this[0]);
}
}
}