Out of bounds negative array indices should raise
This commit is contained in:
1 parent
2d1a75f550
commit
20ca21cb0d
2 files changed
+13
-9
No files matched your search
+4
-4
@@ -156,13 +156,13 @@ null
|
||||
# Negative array indices
|
||||
#
|
||||
|
||||
.foo[-1] = 0
|
||||
try (.foo[-1] = 0) catch .
|
||||
null
|
||||
{"foo":[0]}
|
||||
"Out of bounds negative array index"
|
||||
|
||||
.foo[-2] = 0
|
||||
try (.foo[-2] = 0) catch .
|
||||
null
|
||||
{"foo":[0]}
|
||||
"Out of bounds negative array index"
|
||||
|
||||
.[-1] = 5
|
||||
[0,1,2]
|
||||
|
||||
Reference in new issue
Block a user