solidity/test/libsolidity/semanticTests/array/string_allocation_bug.sol

21 lines
374 B
Solidity
Raw Normal View History

contract Sample {
struct s {
uint16 x;
uint16 y;
string a;
string b;
}
s[2] public p;
2020-06-23 12:14:24 +00:00
constructor() {
s memory m;
m.x = 0xbbbb;
m.y = 0xcccc;
m.a = "hello";
m.b = "world";
p[0] = m;
}
}
// ----
// p(uint256): 0x0 -> 0xbbbb, 0xcccc, 0x80, 0xc0, 0x05, "hello", 0x05, "world"