diff options
author | bakaoh <tatattai@gmail.com> | 2018-08-30 11:08:49 +0800 |
---|---|---|
committer | bakaoh <tatattai@gmail.com> | 2018-09-05 11:54:38 +0800 |
commit | a7ffff6a2916a5e501d9a338a82811d53846b777 (patch) | |
tree | 33b5919cde05faa85bd2a4cfa1723d3585f0a2ef /test/libsolidity | |
parent | 410d288dfc2e08c42df58c7e01ad5c332ce92727 (diff) | |
download | dexon-solidity-a7ffff6a2916a5e501d9a338a82811d53846b777.tar.gz dexon-solidity-a7ffff6a2916a5e501d9a338a82811d53846b777.tar.zst dexon-solidity-a7ffff6a2916a5e501d9a338a82811d53846b777.zip |
Fix #4716: Crash when array index value is too large
Diffstat (limited to 'test/libsolidity')
-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 |