mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
codegen: assertion did not assert non-nullness
This commit strengthens an assertion so that it makes sure that a pointer is not null. Moreover, `isLocalVariable(variable)` is now positively asserted, following the error message.
This commit is contained in:
parent
67f274f66c
commit
e29047b24d
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user