solidity/test/libsolidity/semanticTests/array/inline_array_index_access_strings.sol
2020-03-19 14:42:25 +01:00

16 lines
251 B
Solidity

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"