solidity/test/libsolidity/semanticTests/array/inline_array_return.sol

16 lines
335 B
Solidity
Raw Normal View History

contract C {
uint8[] tester;
function f() public returns (uint8[5] memory) {
return ([1, 2, 3, 4, 5]);
}
function test() public returns (uint8, uint8, uint8, uint8, uint8) {
tester = f();
return (tester[0], tester[1], tester[2], tester[3], tester[4]);
}
}
// ----
// f() -> 1, 2, 3, 4, 5