aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-03-03 19:58:01 +0800
committerLiana Husikyan <liana@ethdev.com>2015-03-16 17:46:46 +0800
commit67cd3a7180023f613efda64f4f4d2b1bc37990c6 (patch)
tree2a21e2f726baf19f39e999083158a32f90492cec /ExpressionCompiler.cpp
parenta16677dcfbd7fd7d42fbd6166e234b1b7001ec59 (diff)
downloaddexon-solidity-67cd3a7180023f613efda64f4f4d2b1bc37990c6.tar.gz
dexon-solidity-67cd3a7180023f613efda64f4f4d2b1bc37990c6.tar.zst
dexon-solidity-67cd3a7180023f613efda64f4f4d2b1bc37990c6.zip
added parsing for constant variables
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r--ExpressionCompiler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp
index 331979c7..ce5f184b 100644
--- a/ExpressionCompiler.cpp
+++ b/ExpressionCompiler.cpp
@@ -855,8 +855,11 @@ void ExpressionCompiler::endVisit(Identifier const& _identifier)
}
else if (FunctionDefinition const* functionDef = dynamic_cast<FunctionDefinition const*>(declaration))
m_context << m_context.getVirtualFunctionEntryLabel(*functionDef).pushTag();
- else if (dynamic_cast<VariableDeclaration const*>(declaration))
- setLValueFromDeclaration(*declaration, _identifier);
+ else if (auto variable = dynamic_cast<VariableDeclaration const*>(declaration))
+ {
+ if (!variable->isConstant())
+ setLValueFromDeclaration(*declaration, _identifier);
+ }
else if (dynamic_cast<ContractDefinition const*>(declaration))
{
// no-op