diff options
author | chriseth <chris@ethereum.org> | 2018-08-14 17:36:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-14 17:36:19 +0800 |
commit | 6ca3973944546d1a5518274fea47e635a07f9ca5 (patch) | |
tree | 89905149f0c5c9e3b85e0259e739f0fba7d316de /test/libsolidity | |
parent | 3dd31b704af6c50bc56217fd07266f7872daaa44 (diff) | |
parent | bd567a22c9e901d2c7ae73a63f63dc56896b9461 (diff) | |
download | dexon-solidity-6ca3973944546d1a5518274fea47e635a07f9ca5.tar.gz dexon-solidity-6ca3973944546d1a5518274fea47e635a07f9ca5.tar.zst dexon-solidity-6ca3973944546d1a5518274fea47e635a07f9ca5.zip |
Merge pull request #4777 from ethereum/typeConversionMemory
Defaul data location for type conversions is memory.
Diffstat (limited to 'test/libsolidity')
3 files changed, 7 insertions, 2 deletions
diff --git a/test/libsolidity/syntaxTests/conversion/conversion_to_bytes.sol b/test/libsolidity/syntaxTests/conversion/conversion_to_bytes.sol new file mode 100644 index 00000000..5946e921 --- /dev/null +++ b/test/libsolidity/syntaxTests/conversion/conversion_to_bytes.sol @@ -0,0 +1,5 @@ +contract test { + function f() public pure returns (bytes) { + return bytes("abc"); + } +} diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/186_invalid_utf8_explicit.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/186_invalid_utf8_explicit.sol index 401c46e2..0f67460f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/186_invalid_utf8_explicit.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/186_invalid_utf8_explicit.sol @@ -2,4 +2,4 @@ contract C { string s = string("\xa0\x00"); } // ---- -// TypeError: (28-46): Explicit type conversion not allowed from "literal_string (contains invalid UTF-8 sequence at position 0)" to "string storage pointer". +// TypeError: (28-46): Explicit type conversion not allowed from "literal_string (contains invalid UTF-8 sequence at position 0)" to "string memory". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/482_explicit_literal_to_unspecified_string.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/482_explicit_literal_to_unspecified_string.sol index a83eee72..c44fab55 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/482_explicit_literal_to_unspecified_string.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/482_explicit_literal_to_unspecified_string.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (52-65): Explicit type conversion not allowed from "literal_string "abc"" to "string storage pointer". +// Warning: (52-65): Statement has no effect. |