Merge pull request #9849 from ethereum/fixIce9817

Fixing ICE on returning struct with mapping from library
This commit is contained in:
chriseth
2020-10-14 00:05:19 +02:00
committed by GitHub
4 changed files with 31 additions and 5 deletions
@@ -0,0 +1,21 @@
pragma experimental ABIEncoderV2;
library Lib {
struct Items {
mapping (uint => uint) a;
}
function get() public returns (Items storage x) {
assembly { x.slot := 123 }
}
}
contract C {
function f() public returns(uint256 slot) {
Lib.Items storage ptr = Lib.get();
assembly { slot := ptr.slot }
}
}
// ----
// library: Lib
// f() -> 123