add tests for state variables accessors. normal and constant

fixed the issue with accessors for constant state variables
This commit is contained in:
LianaHus
2015-08-21 17:57:57 +02:00
parent 289b814670
commit 1af8ff0121
6 changed files with 45 additions and 4 deletions
+4 -1
View File
@@ -390,7 +390,10 @@ bool Compiler::visit(VariableDeclaration const& _variableDeclaration)
m_breakTags.clear();
m_continueTags.clear();
ExpressionCompiler(m_context, m_optimize).appendStateVariableAccessor(_variableDeclaration);
if (_variableDeclaration.isConstant())
ExpressionCompiler(m_context, m_optimize).appendConstStateVariableAccessor(_variableDeclaration);
else
ExpressionCompiler(m_context, m_optimize).appendStateVariableAccessor(_variableDeclaration);
return false;
}