aboutsummaryrefslogtreecommitdiffstats
path: root/AST.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 /AST.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 'AST.cpp')
-rw-r--r--AST.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/AST.cpp b/AST.cpp
index 46c44995..b0560263 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -197,7 +197,7 @@ vector<pair<FixedHash<4>, FunctionTypePointer>> const& ContractDefinition::getIn
}
for (ASTPointer<VariableDeclaration> const& v: contract->getStateVariables())
- if (v->isPublic() && functionsSeen.count(v->getName()) == 0)
+ if (v->isPublic() && functionsSeen.count(v->getName()) == 0 && !v->isConstant())
{
FunctionType ftype(*v);
functionsSeen.insert(v->getName());
@@ -322,8 +322,8 @@ string FunctionDefinition::getCanonicalSignature() const
bool VariableDeclaration::isLValue() const
{
- // External function parameters are Read-Only
- return !isExternalFunctionParameter();
+ // External function parameters and constant declared variables are Read-Only
+ return !isExternalFunctionParameter() && !m_isConstant;
}
void VariableDeclaration::checkTypeRequirements()