blob: a9fd809a3bef82a18d9f7bd1b3bc95f4ac806816 [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001// Copyright 2015 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
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00005'use strict';
6
7var typedArray = new Int8Array(1);
8var saved;
9var called;
10class TypedArraySubclass extends Int8Array {
11 constructor(x) {
12 super(x);
13 called = true;
14 saved = x;
15 }
16}
17typedArray.constructor = TypedArraySubclass
18typedArray.map(function(){});
19
20assertTrue(called);
21assertEquals(saved, 1);