solidity/test/libsolidity/syntaxTests/literalSuffixes/parameters/parameter_location.sol
Kamil Śliwak 8adf89f042 Test cases
2022-08-11 09:37:32 +02:00

15 lines
591 B
Solidity

function calldataSuffix(string memory s) pure returns (string memory) {}
function memorySuffix(string calldata s) pure returns (string memory) {}
function storageSuffix(string storage s) pure returns (string memory) {}
contract C {
function f() public pure {
"a" calldataSuffix;
"a" memorySuffix;
"a" storageSuffix;
}
}
// ----
// TypeError 8838: (300-316): The type of the literal cannot be converted to the parameter of the suffix function.
// TypeError 8838: (326-343): The type of the literal cannot be converted to the parameter of the suffix function.