solidity/test/libsolidity/semanticTests/array/memory.sol
Daniel Kirchner a8f7c69c47 Adjust tests.
2021-09-13 20:41:40 +02:00

19 lines
399 B
Solidity

pragma solidity >= 0.6.0;
contract C {
function h(uint[4] memory n) public pure returns (uint) {
return n[0] + n[1] + n[2] + n[3];
}
function i(uint[4] memory n) public view returns (uint) {
return this.h(n) * 2;
}
}
// ====
// requiresYulOptimizer: minimalStack
// compileViaYul: also
// ----
// h(uint256[4]): 1, 2, 3, 4 -> 10
// i(uint256[4]): 1, 2, 3, 4 -> 20