mirror of https://github.com/svaarala/duktape.git
Sami Vaarala
11 years ago
1 changed files with 20 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||||
|
/* |
||||
|
* Development time bug caused by too lenient string-to-array-index |
||||
|
* conversion. |
||||
|
*/ |
||||
|
|
||||
|
/*=== |
||||
|
quux |
||||
|
quux |
||||
|
undefined |
||||
|
===*/ |
||||
|
|
||||
|
try { |
||||
|
var arr = [ 'foo', 'bar', 'quux', 'baz' ]; |
||||
|
print(arr[2]); |
||||
|
print(arr['2']); |
||||
|
print(arr['02']); // should be undefined, '02' is not an array index compatible string
|
||||
|
} catch (e) { |
||||
|
print(e); |
||||
|
} |
||||
|
|
Loading…
Reference in new issue