await-in-nested-function.js (437B)
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 <brian.terlson@microsoft.com> 6 esid: pending 7 description: > 8 Await is allowed as an identifier in functions nested in async functions 9 ---*/ 10 11 var await; 12 async function foo() { 13 function bar() { 14 await = 1; 15 } 16 bar(); 17 } 18 foo(); 19 20 assert.sameValue(await, 1); 21 22 reportCompare(0, 0);