diff options
Diffstat (limited to 'libsolidity/ExpressionCompiler.cpp')
-rw-r--r-- | libsolidity/ExpressionCompiler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libsolidity/ExpressionCompiler.cpp b/libsolidity/ExpressionCompiler.cpp index 449267a7..d5a8362e 100644 --- a/libsolidity/ExpressionCompiler.cpp +++ b/libsolidity/ExpressionCompiler.cpp @@ -71,6 +71,7 @@ void ExpressionCompiler::appendConstStateVariableAccessor(VariableDeclaration co { solAssert(_varDecl.isConstant(), ""); _varDecl.value()->accept(*this); + utils().convertType(*_varDecl.value()->type(), *_varDecl.type()); // append return m_context << eth::dupInstruction(_varDecl.type()->sizeOnStack() + 1); @@ -918,7 +919,10 @@ void ExpressionCompiler::endVisit(Identifier const& _identifier) if (!variable->isConstant()) setLValueFromDeclaration(*declaration, _identifier); else + { variable->value()->accept(*this); + utils().convertType(*variable->value()->type(), *variable->type()); + } } else if (dynamic_cast<ContractDefinition const*>(declaration)) { |