Refactoring: Check types outside of AST and recover from some errors.

This commit is contained in:
chriseth
2015-09-21 20:03:05 +02:00
parent 352c196eb3
commit 34a81fd60e
33 changed files with 2295 additions and 1802 deletions
+1 -1
View File
@@ -600,7 +600,7 @@ void CompilerUtils::pushZeroValue(const Type& _type)
void CompilerUtils::moveToStackVariable(VariableDeclaration const& _variable)
{
unsigned const stackPosition = m_context.baseToCurrentStackOffset(m_context.baseStackOffsetOfVariable(_variable));
unsigned const size = _variable.type()->sizeOnStack();
unsigned const size = _variable.annotation().type->sizeOnStack();
solAssert(stackPosition >= size, "Variable size and position mismatch.");
// move variable starting from its top end in the stack
if (stackPosition - size + 1 > 16)