solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/481_explicit_literal_to_unspecified_string_assignment.sol

9 lines
329 B
Solidity
Raw Normal View History

contract C {
function f() pure public {
string x = "abc";
}
}
// ----
// Warning: (52-60): Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning.
// TypeError: (52-68): Type literal_string "abc" is not implicitly convertible to expected type string storage pointer.