OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Flags: --harmony-async-await |
| 6 |
| 7 var O = { |
| 8 [Symbol.toStringTag]: "LexicalThis", |
| 9 run(n) { |
| 10 return async passFail => `${n}. ${passFail}: ${this}`; |
| 11 }, |
| 12 }; |
| 13 |
| 14 assertEqualsAsync("1. PASS: [object LexicalThis]", () => O.run(1)("PASS")); |
| 15 |
| 16 var O2 = { |
| 17 [Symbol.toStringTag]: "LexicalThis", |
| 18 run: O.run(2) |
| 19 }; |
| 20 |
| 21 assertEqualsAsync("2. PASS: [object LexicalThis]", () => O2.run("PASS")); |
OLD | NEW |