aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/Compiler.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-08-22 00:17:05 +0800
committerchriseth <c@ethdev.com>2015-08-22 00:17:05 +0800
commit625be53252d6ef98a20b7e5abd3e675fcbc55c6b (patch)
tree6fdefe16fd29f36ca583f27472796feead5a33e9 /libsolidity/Compiler.cpp
parentb999819d9938c248f060473ba13d3306a166a6f6 (diff)
parent1af8ff01215f4d6ab5d5b3b1c4e2d1785a69c9c9 (diff)
downloaddexon-solidity-625be53252d6ef98a20b7e5abd3e675fcbc55c6b.tar
dexon-solidity-625be53252d6ef98a20b7e5abd3e675fcbc55c6b.tar.gz
dexon-solidity-625be53252d6ef98a20b7e5abd3e675fcbc55c6b.tar.bz2
dexon-solidity-625be53252d6ef98a20b7e5abd3e675fcbc55c6b.tar.lz
dexon-solidity-625be53252d6ef98a20b7e5abd3e675fcbc55c6b.tar.xz
dexon-solidity-625be53252d6ef98a20b7e5abd3e675fcbc55c6b.tar.zst
dexon-solidity-625be53252d6ef98a20b7e5abd3e675fcbc55c6b.zip
Merge pull request #22 from LianaHus/sol_accessors_for_const_state_var
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 f7bcd50c..758926d7 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;
}