blob: f8cf7467230840416aa0ddb30bed01fb34d2e0f7 [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Flags: --allow-natives-syntax
6
7"use strict";
8
9var a = [];
10Object.defineProperty(a, "0", {configurable: false, value: 10});
11assertEquals(1, a.length);
12var setter = ()=>{ a.length = 0; };
13assertThrows(setter);
14assertThrows(setter);
15%OptimizeFunctionOnNextCall(setter);
16assertThrows(setter);