aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/Compiler.cpp
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-08-21 23:57:57 +0800
committerLianaHus <liana@ethdev.com>2015-08-21 23:57:57 +0800
commit1af8ff01215f4d6ab5d5b3b1c4e2d1785a69c9c9 (patch)
tree8be884acdc58815c5463860c6ff147f37f548793 /libsolidity/Compiler.cpp
parent289b8146703521943e6106e5d3f178deb0117652 (diff)
downloaddexon-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.cpp5
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;
}