google / starlark-go

Starlark in Go: the Starlark configuration language, implemented in Go
BSD 3-Clause "New" or "Revised" License
2.3k stars 209 forks source link

bigint used as slice index causes bad error message #306

Closed alandonovan closed 3 years ago

alandonovan commented 3 years ago
$ starlark
Welcome to Starlark (go.starlark.net)
>>> [][:1<<100]
Traceback (most recent call last):
  <stdin>:1:6: in <expr>
Error: invalid end index: got int, want int
alandonovan commented 3 years ago

Appears to have been fixed:

>>> [][:1<<100]
Traceback (most recent call last):
  <stdin>:1:6: in <expr>
Error: invalid end index: 1267650600228229401496703205376 out of range