Fix "slot" access via mapping reference in assembly

This commit is contained in:
wechman
2022-08-17 07:53:52 +02:00
parent bb41ddd7ab
commit cf3bae0839
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"));