| 1 |
// Copyright (C) 2015 the V8 project authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
/*--- |
| 4 |
es6id: 23.4.1.1 |
| 5 |
esid: sec-weakset-iterable |
| 6 |
description: > |
| 7 |
If the iterable argument is undefined, return new Weakset object. |
| 8 |
info: | |
| 9 |
23.4.1.1 WeakSet ( [ iterable ] ) |
| 10 |
|
| 11 |
... |
| 12 |
7. Else, |
| 13 |
d. Let iter be GetIterator(iterable). |
| 14 |
e. ReturnIfAbrupt(iter). |
| 15 |
... |
| 16 |
---*/ |
| 17 |
|
| 18 |
assert.throws(TypeError, function() { |
| 19 |
new WeakSet({}); |
| 20 |
}); |