Improved "Stack too deep" error message.

Closes #2080.
This commit is contained in:
chriseth
2015-06-07 12:51:15 +02:00
parent b51ef4a357
commit c2a9419e49
5 changed files with 32 additions and 14 deletions
+1 -1
View File
@@ -263,7 +263,7 @@ bool ExpressionCompiler::visit(Assignment const& _assignment)
appendOrdinaryBinaryOperatorCode(Token::AssignmentToBinaryOp(op), *_assignment.getType());
if (lvalueSize > 0)
{
solAssert(itemSize + lvalueSize <= 16, "Stack too deep.");
solAssert(itemSize + lvalueSize <= 16, "Stack too deep, try removing local variables.");
// value [lvalue_ref] updated_value
for (unsigned i = 0; i < itemSize; ++i)
m_context << eth::swapInstruction(itemSize + lvalueSize) << eth::Instruction::POP;