mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #10912 from ethereum/calldataLValueSol2Yul
[Sol->Yul] Check lvalue kind is stack in case of calldata.
This commit is contained in:
commit
4fd5643970
@ -2918,7 +2918,11 @@ void IRGeneratorForStatements::setLValue(Expression const& _expression, IRLValue
|
||||
solAssert(!m_currentLValue, "");
|
||||
|
||||
if (_expression.annotation().willBeWrittenTo)
|
||||
{
|
||||
m_currentLValue.emplace(std::move(_lvalue));
|
||||
if (_lvalue.type.dataStoredIn(DataLocation::CallData))
|
||||
solAssert(holds_alternative<IRLValue::Stack>(_lvalue.kind), "");
|
||||
}
|
||||
else
|
||||
// Only define the expression, if it will not be written to.
|
||||
define(_expression, readFromLValue(_lvalue));
|
||||
|
Loading…
Reference in New Issue
Block a user