tests/auto/qml/ecmascripttests/test262/test/language/expressions/await/await-in-nested-function.js
raw| 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 | 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); |