regress-544991.js 478 Bytes
Newer Older
1 2 3 4
// Copyright 2015 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.

5 6
'use strict';

7 8 9
var typedArray = new Int8Array(1);
var saved;
var called;
10 11 12 13 14 15 16 17
class TypedArraySubclass extends Int8Array {
  constructor(x) {
    super(x);
    called = true;
    saved = x;
  }
}
typedArray.constructor = TypedArraySubclass
18 19
typedArray.map(function(){});

20 21
assertTrue(called);
assertEquals(saved, 1);