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:
@@ -0,0 +1,2 @@
|
||||
var a = "123"
|
||||
a[-5] // expect runtime error: Subscript out of bounds.
|
||||
Reference in New Issue
Block a user