Files
wren/test/string/subscript_too_large.wren
T
Bob Nystrom 53884b1332 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.
2014-01-03 18:47:26 +00:00

3 lines
69 B
Plaintext

var a = "123"
a[4] // expect runtime error: Subscript out of bounds.