Fix checking attempts to access items outside the list

This commit is contained in:
Bartłomiej Pluta
2019-07-09 23:27:53 +02:00
parent 67d05c23be
commit c57be77bcc

View File

@@ -8,7 +8,7 @@ _signature1 = signature(ofType(Type.LIST), ofType(Type.INTEGER))
def _function1(env, list, index):
try:
return list.value[index.value]
except KeyError:
except IndexError:
raise RuntimeException(f"Attempt to access item which is outside the list", None)