Merge pull request #1462 from ethereum/fix-incorrect-assertion

codegen: assertion did not assert non-nullness
This commit is contained in:
chriseth 2016-12-01 15:14:31 +01:00 committed by GitHub
commit 55a719a79c
2 changed files with 2 additions and 2 deletions

View File

@ -583,7 +583,7 @@ bool ContractCompiler::visit(InlineAssembly const& _inlineAssembly)
// lvalue context
auto variable = dynamic_cast<VariableDeclaration const*>(decl);
solAssert(
!!variable || !m_context.isLocalVariable(variable),
!!variable && m_context.isLocalVariable(variable),
"Can only assign to stack variables in inline assembly."
);
unsigned size = variable->type()->sizeOnStack();

View File

@ -4521,7 +4521,7 @@ BOOST_AUTO_TEST_CASE(inline_assembly_storage)
}
}
)";
CHECK_ERROR(text, DeclarationError, "");
CHECK_ERROR(text, DeclarationError, "not found, not unique or not lvalue.");
}
BOOST_AUTO_TEST_CASE(inline_assembly_storage_in_modifiers)