[Sol2Yul] Fixing setLValue for calldata types.

This commit is contained in:
Djordje Mijovic
2021-02-08 12:42:10 +01:00
parent a39aae8604
commit 706f5d9874
2 changed files with 10 additions and 3 deletions
@@ -2918,10 +2918,7 @@ void IRGeneratorForStatements::setLValue(Expression const& _expression, IRLValue
solAssert(!m_currentLValue, "");
if (_expression.annotation().willBeWrittenTo)
{
m_currentLValue.emplace(std::move(_lvalue));
solAssert(!_lvalue.type.dataStoredIn(DataLocation::CallData), "");
}
else
// Only define the expression, if it will not be written to.
define(_expression, readFromLValue(_lvalue));