solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/482_explicit_literal_to_unspecified_string.sol

8 lines
200 B
Solidity
Raw Normal View History

contract C {
function f() pure public {
string("abc");
}
}
// ----
// TypeError: (52-65): Explicit type conversion not allowed from "literal_string "abc"" to "string storage pointer".