mirror of https://github.com/tc39/test262.git
25 lines
445 B
JavaScript
25 lines
445 B
JavaScript
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
es6id: 9.5.11
|
|
description: >
|
|
[[Enumerate]] ()
|
|
|
|
The result must be an Object
|
|
features: [Symbol]
|
|
---*/
|
|
|
|
var x;
|
|
var target = {
|
|
attr: 1
|
|
};
|
|
var p = new Proxy(target, {
|
|
enumerate: function() {
|
|
return Symbol();
|
|
}
|
|
});
|
|
|
|
assert.throws(TypeError, function() {
|
|
for (x in p) {}
|
|
});
|