aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution/224_string_bytes_conversion.sol
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-08-15 03:38:07 +0800
committerGitHub <noreply@github.com>2018-08-15 03:38:07 +0800
commitcc54f6c4256cdccf4b25586ed63800caa836d9c6 (patch)
tree11fe607f1acbc6daaa8d17b30ac45db2f7981d77 /test/libsolidity/syntaxTests/nameAndTypeResolution/224_string_bytes_conversion.sol
parent8f27fb1f4a14f369e8feb3ea22a38d50998cad5c (diff)
parent14e116c1d57e1797e7206299d0fdfed2aa03cdf2 (diff)
downloaddexon-solidity-cc54f6c4256cdccf4b25586ed63800caa836d9c6.tar
dexon-solidity-cc54f6c4256cdccf4b25586ed63800caa836d9c6.tar.gz
dexon-solidity-cc54f6c4256cdccf4b25586ed63800caa836d9c6.tar.bz2
dexon-solidity-cc54f6c4256cdccf4b25586ed63800caa836d9c6.tar.lz
dexon-solidity-cc54f6c4256cdccf4b25586ed63800caa836d9c6.tar.xz
dexon-solidity-cc54f6c4256cdccf4b25586ed63800caa836d9c6.tar.zst
dexon-solidity-cc54f6c4256cdccf4b25586ed63800caa836d9c6.zip
Merge pull request #4738 from ethereum/dataloc_merged
Enforce data location.
Diffstat (limited to 'test/libsolidity/syntaxTests/nameAndTypeResolution/224_string_bytes_conversion.sol')
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/224_string_bytes_conversion.sol18
1 files changed, 6 insertions, 12 deletions
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/224_string_bytes_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/224_string_bytes_conversion.sol
index 7b953abb..ed6a9b37 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/224_string_bytes_conversion.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/224_string_bytes_conversion.sol
@@ -1,17 +1,11 @@
contract Test {
string s;
bytes b;
- function h(string _s) external { bytes(_s).length; }
- function i(string memory _s) internal { bytes(_s).length; }
- function j() internal { bytes(s).length; }
- function k(bytes _b) external { string(_b); }
- function l(bytes memory _b) internal { string(_b); }
- function m() internal { string(b); }
+ function h(string calldata _s) pure external { bytes(_s).length; }
+ function i(string memory _s) pure internal { bytes(_s).length; }
+ function j() view internal { bytes(s).length; }
+ function k(bytes calldata _b) pure external { string(_b); }
+ function l(bytes memory _b) pure internal { string(_b); }
+ function m() view internal { string(b); }
}
// ----
-// Warning: (47-99): Function state mutability can be restricted to pure
-// Warning: (104-163): Function state mutability can be restricted to pure
-// Warning: (168-210): Function state mutability can be restricted to view
-// Warning: (215-260): Function state mutability can be restricted to pure
-// Warning: (265-317): Function state mutability can be restricted to pure
-// Warning: (322-358): Function state mutability can be restricted to view