diff options
author | chriseth <chris@ethereum.org> | 2018-09-06 03:47:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-06 03:47:42 +0800 |
commit | 522174890f9a376f7b192014774fb2f6d3280356 (patch) | |
tree | 38bef8a77b2f169e3b0ce9b6a73859e26086b26c /test/libsolidity/syntaxTests | |
parent | 08a7a51f071e2ef30db011fb36d505c7615785ec (diff) | |
parent | a7ffff6a2916a5e501d9a338a82811d53846b777 (diff) | |
download | dexon-solidity-522174890f9a376f7b192014774fb2f6d3280356.tar.gz dexon-solidity-522174890f9a376f7b192014774fb2f6d3280356.tar.zst dexon-solidity-522174890f9a376f7b192014774fb2f6d3280356.zip |
Merge pull request #4872 from bakaoh/issue4716
Crash when array index value is too large
Diffstat (limited to 'test/libsolidity/syntaxTests')
-rw-r--r-- | test/libsolidity/syntaxTests/types/array_index_too_large.sol | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/types/array_index_too_large.sol b/test/libsolidity/syntaxTests/types/array_index_too_large.sol new file mode 100644 index 00000000..06b5071f --- /dev/null +++ b/test/libsolidity/syntaxTests/types/array_index_too_large.sol @@ -0,0 +1,8 @@ +contract C { + function f() public returns (string memory) { + // this used to cause an internal error + return (["zeppelin"][123456789012345678901234567890123456789012345678901234567890123456789012345678]); + } +} +// ---- +// TypeError: (140-218): Type int_const 1234...(70 digits omitted)...5678 is not implicitly convertible to expected type uint256.
\ No newline at end of file |