has-instance.js (382B)
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 /*--- 5 description: > 6 A Generator object is an instance of a generator function. 7 es6id: 25.3 8 features: [generators] 9 ---*/ 10 11 var g = function*() {}; 12 13 assert(g() instanceof g, 'Instance created via function invocation'); 14 15 reportCompare(0, 0);