mirror of https://github.com/tc39/test262.git
Array binding: add deleted Array.prototype[Symbol.iterator] test case
This commit is contained in:
parent
36f73c6142
commit
2f8e8fa6b0
|
@ -0,0 +1,32 @@
|
|||
// Copyright (C) 2020 Alexey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: Abrupt completion returned by GetIterator
|
||||
template: error
|
||||
info: |
|
||||
Runtime Semantics: BindingInitialization
|
||||
|
||||
BindingPattern : ArrayBindingPattern
|
||||
|
||||
1. Let iteratorRecord be ? GetIterator(value).
|
||||
|
||||
GetIterator ( obj [ , hint [ , method ] ] )
|
||||
|
||||
[...]
|
||||
4. Let iterator be ? Call(method, obj).
|
||||
|
||||
Call ( F, V [ , argumentsList ] )
|
||||
|
||||
[...]
|
||||
2. If IsCallable(F) is false, throw a TypeError exception.
|
||||
features: [Symbol.iterator]
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
delete Array.prototype[Symbol.iterator];
|
||||
//- elems
|
||||
[x, y, z]
|
||||
//- vals
|
||||
[1, 2, 3]
|
||||
//- error
|
||||
TypeError
|
Loading…
Reference in New Issue