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

16 lines
251 B
Solidity
Raw Normal View History

contract C {
string public tester;
function f() public returns (string memory) {
return (["abc", "def", "g"][0]);
}
function test() public {
tester = f();
}
}
// ----
// test() ->
// tester() -> 0x20, 0x3, "abc"