mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-12 14:48:14 +00:00
[js] add testcase for array indexDefect and remove todo (#19838)
* remove unused opcSubstr
* [js] add testcase for array indexDefect
* Revert "remove unused opcSubstr"
This reverts commit cb461f2545.
This commit is contained in:
@@ -731,10 +731,6 @@ proc parseFloatNative(a: string): float =
|
||||
`result` = Number(`a2`);
|
||||
"""
|
||||
|
||||
#[
|
||||
xxx how come code like this doesn't give IndexDefect ?
|
||||
let z = s[10000] == 'a'
|
||||
]#
|
||||
proc nimParseBiggestFloat(s: string, number: var BiggestFloat, start: int): int {.compilerproc.} =
|
||||
var sign: bool
|
||||
var i = start
|
||||
|
||||
9
tests/js/tindexdefect.nim
Normal file
9
tests/js/tindexdefect.nim
Normal file
@@ -0,0 +1,9 @@
|
||||
discard """
|
||||
outputsub: "unhandled exception: index 10000 not in 0 .. 0 [IndexDefect]"
|
||||
exitcode: 1
|
||||
joinable: false
|
||||
"""
|
||||
|
||||
var s = ['a']
|
||||
let z = s[10000] == 'a'
|
||||
echo z
|
||||
Reference in New Issue
Block a user