solidity/test/libsolidity/ASTJSON/assembly/slot_offset.sol

10 lines
158 B
Solidity
Raw Normal View History

2019-10-15 10:38:12 +00:00
contract C {
struct S { uint x; }
S s;
function e() pure public {
assembly { let x := s.offset let y := mul(s.slot, 2) }
2019-10-15 10:38:12 +00:00
}
}
// ----