diff options
author | Liana Husikyan <liana@ethdev.com> | 2015-03-03 19:58:01 +0800 |
---|---|---|
committer | Liana Husikyan <liana@ethdev.com> | 2015-03-16 17:46:46 +0800 |
commit | 67cd3a7180023f613efda64f4f4d2b1bc37990c6 (patch) | |
tree | 2a21e2f726baf19f39e999083158a32f90492cec /AST.cpp | |
parent | a16677dcfbd7fd7d42fbd6166e234b1b7001ec59 (diff) | |
download | dexon-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.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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() |