diff options
author | LianaHus <liana@ethdev.com> | 2015-08-21 23:57:57 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-08-21 23:57:57 +0800 |
commit | 1af8ff01215f4d6ab5d5b3b1c4e2d1785a69c9c9 (patch) | |
tree | 8be884acdc58815c5463860c6ff147f37f548793 /libsolidity/Compiler.cpp | |
parent | 289b8146703521943e6106e5d3f178deb0117652 (diff) | |
download | dexon-solidity-1af8ff01215f4d6ab5d5b3b1c4e2d1785a69c9c9.tar dexon-solidity-1af8ff01215f4d6ab5d5b3b1c4e2d1785a69c9c9.tar.gz dexon-solidity-1af8ff01215f4d6ab5d5b3b1c4e2d1785a69c9c9.tar.bz2 dexon-solidity-1af8ff01215f4d6ab5d5b3b1c4e2d1785a69c9c9.tar.lz dexon-solidity-1af8ff01215f4d6ab5d5b3b1c4e2d1785a69c9c9.tar.xz dexon-solidity-1af8ff01215f4d6ab5d5b3b1c4e2d1785a69c9c9.tar.zst dexon-solidity-1af8ff01215f4d6ab5d5b3b1c4e2d1785a69c9c9.zip |
add tests for state variables accessors. normal and constant
fixed the issue with accessors for constant state variables
Diffstat (limited to 'libsolidity/Compiler.cpp')
-rw-r--r-- | libsolidity/Compiler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libsolidity/Compiler.cpp b/libsolidity/Compiler.cpp index f0d1b38e..d86e8990 100644 --- a/libsolidity/Compiler.cpp +++ b/libsolidity/Compiler.cpp @@ -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; } |