From d7ce89ca9a77a6b870cc607ef8128cf9569ea8fb Mon Sep 17 00:00:00 2001 From: arookas Date: Mon, 22 Feb 2016 20:52:41 -0500 Subject: [PATCH] Added check against constant declarations --- ssc/ast/nodes.variables.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ssc/ast/nodes.variables.cs b/ssc/ast/nodes.variables.cs index d9cc8bb..4d3cbd9 100644 --- a/ssc/ast/nodes.variables.cs +++ b/ssc/ast/nodes.variables.cs @@ -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]); + } } }