blob: 467c2572d9bff6b0b4d15a3212b7af7b2a67880a [file] [log] [blame]
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
Generator functions declared as methods cannot be used as constructors.
es6id: 14.4.13
features: [generators]
---*/
var method = { *method() {} }.method;
assert.throws(TypeError, function() {
var instance = new method();
});