mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[Sol->Yul] Enabling copying_bytes_multiassign test via ir.
This commit is contained in:
parent
055c4b4d44
commit
a0c80c2bdb
@ -449,12 +449,11 @@ bool IRGeneratorForStatements::visit(Assignment const& _assignment)
|
|||||||
|
|
||||||
writeToLValue(*m_currentLValue, value);
|
writeToLValue(*m_currentLValue, value);
|
||||||
|
|
||||||
if (
|
if (dynamic_cast<ReferenceType const*>(&m_currentLValue->type))
|
||||||
m_currentLValue->type.category() != Type::Category::Struct &&
|
define(_assignment, readFromLValue(*m_currentLValue));
|
||||||
m_currentLValue->type.category() != Type::Category::Array &&
|
else if (*_assignment.annotation().type != *TypeProvider::emptyTuple())
|
||||||
*_assignment.annotation().type != *TypeProvider::emptyTuple()
|
|
||||||
)
|
|
||||||
define(_assignment, value);
|
define(_assignment, value);
|
||||||
|
|
||||||
m_currentLValue.reset();
|
m_currentLValue.reset();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -2419,6 +2419,8 @@ BOOST_AUTO_TEST_CASE(copying_bytes_multiassign)
|
|||||||
bytes savedData2;
|
bytes savedData2;
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
ALSO_VIA_YUL(
|
||||||
|
DISABLE_EWASM_TESTRUN()
|
||||||
compileAndRun(sourceCode, 0, "sender");
|
compileAndRun(sourceCode, 0, "sender");
|
||||||
ABI_CHECK(callContractFunction("recv(uint256)", 7), bytes());
|
ABI_CHECK(callContractFunction("recv(uint256)", 7), bytes());
|
||||||
ABI_CHECK(callContractFunction("val()"), encodeArgs(0));
|
ABI_CHECK(callContractFunction("val()"), encodeArgs(0));
|
||||||
@ -2428,6 +2430,7 @@ BOOST_AUTO_TEST_CASE(copying_bytes_multiassign)
|
|||||||
ABI_CHECK(callContractFunction("val()"), encodeArgs(16));
|
ABI_CHECK(callContractFunction("val()"), encodeArgs(16));
|
||||||
ABI_CHECK(callContractFunction("forward(bool)", true), encodeArgs(true));
|
ABI_CHECK(callContractFunction("forward(bool)", true), encodeArgs(true));
|
||||||
ABI_CHECK(callContractFunction("val()"), encodeArgs(0x80));
|
ABI_CHECK(callContractFunction("val()"), encodeArgs(0x80));
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(copy_from_calldata_removes_bytes_data)
|
BOOST_AUTO_TEST_CASE(copy_from_calldata_removes_bytes_data)
|
||||||
|
Loading…
Reference in New Issue
Block a user