mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Test for calling external library functions with mapping parameters (does not work via Yul yet)
This commit is contained in:
parent
dfa0a0cdff
commit
ced140615a
@ -0,0 +1,17 @@
|
|||||||
|
library L {
|
||||||
|
function f(mapping(uint256 => uint256) storage _a) external returns (uint256) {
|
||||||
|
return _a[0] * _a[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contract C {
|
||||||
|
mapping(uint256 => uint256) x;
|
||||||
|
|
||||||
|
function g(uint256 _value) external returns (uint256) {
|
||||||
|
x[0] = x[1] = _value;
|
||||||
|
return L.f(x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// library: L
|
||||||
|
// g(uint256): 4 -> 16
|
Loading…
Reference in New Issue
Block a user