solidity/test/libsolidity/semanticTests/libraries/internal_call_attached_with_parentheses.sol
2023-05-11 10:56:55 -05:00

25 lines
365 B
Solidity

library L {
struct S {
uint256[] data;
}
function f(S memory _s) internal {
_s.data[3] += 2;
}
}
contract C {
using L for L.S;
function f() public returns (uint256) {
L.S memory x;
x.data = new uint256[](7);
x.data[3] = 8;
(x.f)();
return x.data[3];
}
}
// ----
// f() -> 0x0a