solidity/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol
Djordje Mijovic b73e9f3eef Update tests.
2021-03-10 14:22:30 +01:00

27 lines
495 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
// compileViaYul: also
// ----
// test() -> true
// gas irOptimized: 101589
// gas legacy: 106427
// gas legacyOptimized: 101306