methods-async-super-call-param.js (552B)
1 // |reftest| async 2 // Copyright 2016 Microsoft, Inc. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 author: Brian Terlson <brian.terlson@microsoft.com> 7 esid: pending 8 description: > 9 Super calls work in the parameter list of async methods 10 flags: [async] 11 features: [async-functions] 12 ---*/ 13 14 class A { 15 async method() { 16 return 'sup'; 17 } 18 } 19 20 class B extends A { 21 async method(x = super.method()) { 22 assert.sameValue(await x, 'sup'); 23 } 24 } 25 var child = new B(); 26 child.method().then($DONE, $DONE);