| 1 |
// Copyright 2016 Microsoft, Inc. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
author: Brian Terlson <[email protected]> |
| 6 |
esid: pending |
| 7 |
description: > |
| 8 |
Super calls work in parameter list of async methods |
| 9 |
flags: [async] |
| 10 |
---*/ |
| 11 |
|
| 12 |
var sup = { |
| 13 |
method() { |
| 14 |
return 'sup'; |
| 15 |
} |
| 16 |
} |
| 17 |
|
| 18 |
var child = { |
| 19 |
async method(x = super.method()) { |
| 20 |
var y = await x; |
| 21 |
assert.sameValue(y, 'sup'); |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
Object.setPrototypeOf(child, sup); |
| 26 |
|
| 27 |
child.method().then($DONE, $DONE); |
| 28 |
|