mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1462 from ethereum/fix-incorrect-assertion
codegen: assertion did not assert non-nullness
This commit is contained in:
commit
55a719a79c
@ -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();
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user