diff options
author | Erik Kundt <bitshift@posteo.org> | 2018-10-11 01:33:45 +0800 |
---|---|---|
committer | Erik Kundt <bitshift@posteo.org> | 2018-10-11 01:49:25 +0800 |
commit | 763ae300233adb6650b6bc6d34c765f853960cd1 (patch) | |
tree | b6975fcec7c29707a4f4344c4c27ee4bc4f1e4c7 /test/libsolidity/syntaxTests/indexing/array_multidim_rational.sol | |
parent | 06200b4b64c911ea2e0b12076e0fa02093dacbf8 (diff) | |
download | dexon-solidity-763ae300233adb6650b6bc6d34c765f853960cd1.tar dexon-solidity-763ae300233adb6650b6bc6d34c765f853960cd1.tar.gz dexon-solidity-763ae300233adb6650b6bc6d34c765f853960cd1.tar.bz2 dexon-solidity-763ae300233adb6650b6bc6d34c765f853960cd1.tar.lz dexon-solidity-763ae300233adb6650b6bc6d34c765f853960cd1.tar.xz dexon-solidity-763ae300233adb6650b6bc6d34c765f853960cd1.tar.zst dexon-solidity-763ae300233adb6650b6bc6d34c765f853960cd1.zip |
Fixes crash on non-unsigned array index.
Diffstat (limited to 'test/libsolidity/syntaxTests/indexing/array_multidim_rational.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/indexing/array_multidim_rational.sol | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/indexing/array_multidim_rational.sol b/test/libsolidity/syntaxTests/indexing/array_multidim_rational.sol new file mode 100644 index 00000000..df9f8223 --- /dev/null +++ b/test/libsolidity/syntaxTests/indexing/array_multidim_rational.sol @@ -0,0 +1,11 @@ +contract C { + function f() public { + bytes[32] memory a; + a[8**90][8**90][8**90*0.1]; + } +} +// ---- +// TypeError: (67-72): Type int_const 1897...(74 digits omitted)...1424 is not implicitly convertible to expected type uint256. +// TypeError: (74-79): Type int_const 1897...(74 digits omitted)...1424 is not implicitly convertible to expected type uint256. +// TypeError: (81-90): Type rational_const 9485...(73 digits omitted)...5712 / 5 is not implicitly convertible to expected type uint256. +// TypeError: (65-91): Index expression cannot be represented as an unsigned integer. |