solidity/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol
Daniel Kirchner 44da8507b1 Change default EVM version to Shanghai.
Co-authored-by: Rodrigo Q. Saramago <rodrigoqsaramago@gmail.com>
2023-05-08 16:34:23 +02:00

26 lines
472 B
Solidity

contract c {
struct Struct {
uint256 a;
uint256 b;
}
uint[75] r;
Struct data1;
Struct data2;
function test() public returns (bool) {
data1.a = 1;
data1.b = 2;
Struct memory x = data1;
data2 = x;
return data2.a == data1.a && data2.b == data1.b;
}
}
// ====
// compileToEwasm: also
// ----
// test() -> true
// gas irOptimized: 109713
// gas legacy: 110615
// gas legacyOptimized: 109705