AggregateError: If NewTarget is undefined, let newTarget be the active function object (#2537)

This commit is contained in:
Rick Waldron 2020-03-23 18:58:03 -04:00 committed by GitHub
parent db6f630e65
commit dfc7ecc678
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
// Copyright (C) 2020 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-aggregate-error
description: >
NewTarget is undefined
info: |
AggregateError ( errors, message )
1. If NewTarget is undefined, let newTarget be the active function object, else let newTarget be NewTarget.
features: [AggregateError]
---*/
var obj = AggregateError([], '');
assert.sameValue(Object.getPrototypeOf(obj), AggregateError.prototype);
assert(obj instanceof AggregateError);