summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/class/definition/methods-async-super-call-param.js
blob: a2ca86be8de84cf7eb16f3d037cee93cfd51df02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// |reftest| async
// 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: pending
description: >
  Super calls work in the parameter list of async methods
flags: [async]
features: [async-functions]
---*/

class A {
  async method() {
    return 'sup';
  }
}

class B extends A {
  async method(x = super.method()) {
    assert.sameValue(await x, 'sup');
  }
}
var child = new B();
child.method().then($DONE, $DONE);