Merge pull request #13406 from ethereum/slot_on_reference_fix

Fix `.slot` accessing via mapping reference in assembly
This commit is contained in:
Damian Wechman
2022-09-05 14:00:18 +02:00
committed by GitHub
4 changed files with 40 additions and 2 deletions
@@ -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"));