mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
20 lines
344 B
Solidity
20 lines
344 B
Solidity
contract c {
|
|
struct Struct {
|
|
uint256 a;
|
|
uint256 b;
|
|
}
|
|
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;
|
|
}
|
|
}
|
|
|
|
// ----
|
|
// test() -> true
|