Fix for constant strings.

This commit is contained in:
chriseth
2015-09-08 16:51:14 +02:00
parent ea981cb0f5
commit 985eb80695
4 changed files with 60 additions and 6 deletions
+4
View File
@@ -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))
{