feat: replace validateIndexOld with validateIndex and add validateString for core methods

Remove the deprecated validateIndexOld function and migrate all callers to the new validateIndex that reports runtime errors. Add validateString helper for string argument checking. Introduce comprehensive runtime error tests for list and string subscript operations, removeAt, and contains methods, replacing old silent null returns with proper error halting.
This commit is contained in:
Bob Nystrom
2014-01-03 18:47:26 +00:00
parent 6fb8804c9e
commit 53884b1332
23 changed files with 58 additions and 87 deletions
+2
View File
@@ -0,0 +1,2 @@
var a = "123"
a[1.5] // expect runtime error: Subscript must be an integer.