Fix #4716: Crash when array index value is too large

This commit is contained in:
bakaoh
2018-09-05 10:54:38 +07:00
parent 410d288dfc
commit a7ffff6a29
3 changed files with 14 additions and 4 deletions
@@ -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.