mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #13406 from ethereum/slot_on_reference_fix
Fix `.slot` accessing via mapping reference in assembly
This commit is contained in:
@@ -173,10 +173,9 @@ private:
|
||||
{
|
||||
solAssert(suffix == "slot" || suffix == "offset");
|
||||
solAssert(varDecl->isLocalVariable());
|
||||
solAssert(!varDecl->type()->isValueType());
|
||||
if (suffix == "slot")
|
||||
value = IRVariable{*varDecl}.part("slot").name();
|
||||
else if (varDecl->type()->isValueType())
|
||||
value = IRVariable{*varDecl}.part("offset").name();
|
||||
else
|
||||
{
|
||||
solAssert(!IRVariable{*varDecl}.hasPart("offset"));
|
||||
|
||||
Reference in New Issue
Block a user