2017-07-12 00:18:19 +00:00
|
|
|
// Copyright 2017 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2017-07-20 13:08:39 +00:00
|
|
|
// Flags: --allow-natives-syntax
|
|
|
|
|
2017-07-12 00:18:19 +00:00
|
|
|
var longString = (function() {
|
2017-07-20 13:08:39 +00:00
|
|
|
return "a".repeat(%StringMaxLength());
|
2017-07-12 00:18:19 +00:00
|
|
|
})();
|
|
|
|
|
|
|
|
assertThrows(() => { return { get[longString]() { } } }, RangeError);
|
|
|
|
assertThrows(() => { return { set[longString](v) { } } }, RangeError);
|
|
|
|
assertThrows(() => { return { [Symbol(longString)]: () => {} } }, RangeError);
|