summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/class/definition/methods-async-super-call-body.js
blob: 36930de14e89ac96779ab97df8bb63f3a8294e44 (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
27
// |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 body of async methods
flags: [async]
features: [async-functions]
---*/
class A {
  async method() {
    return 'sup';
  }
}

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