blob: ea84be36e57dc24d5187fb90de965eb4fd8265a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Copyright 2016 Microsoft, Inc. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: sec-async-function-constructor
description: >
%AsyncFunction% is a subclass of Function
---*/
async function foo() {};
var AsyncFunction = foo.constructor;
assert.sameValue(Object.getPrototypeOf(AsyncFunction), Function, "Prototype of constructor is Function");
assert.sameValue(Object.getPrototypeOf(AsyncFunction.prototype), Function.prototype, "Prototype of constructor's prototype is Function.prototype");
assert(foo instanceof Function, 'async function instance is instanceof Function');
reportCompare(0, 0);
|