Chromium Code Reviews| 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. | |
|
Dan Ehrenberg
2016/05/12 02:10:33
This test passes if you patch in https://coderevie
| |
| 4 | |
| 5 // Flags: --harmony-async-await | |
| 6 | |
| 7 class BaseClass { | |
| 8 constructor(x) { | |
| 9 this.name_ = x; | |
| 10 } | |
| 11 get name() { return this.name_; } | |
| 12 }; | |
| 13 | |
| 14 class DeferredSuperCall extends BaseClass { | |
| 15 constructor(x) { | |
| 16 return async() => super(x); | |
| 17 } | |
| 18 }; | |
| 19 | |
| 20 assertEqualsAsync( | |
| 21 "LexicalSuperCall", | |
| 22 new DeferredSuperCall("LexicalSuperCall")().then(x => x.name)); | |
|
Dan Ehrenberg
2016/05/12 02:10:33
Insert () => at the beginning of this line.
| |
| 23 | |
| 24 | |
| 25 class DeferredSuperProperty extends BaseClass { | |
| 26 deferredName() { return async() => super.name; } | |
| 27 }; | |
| 28 | |
| 29 assertEqualsAsync( | |
| 30 "LexicalSuperProperty", | |
| 31 new DeferredSuperProperty("LexicalSuperProperty").deferredName()()); | |
|
Dan Ehrenberg
2016/05/12 02:10:33
Insert () => at the beginning of this line.
| |
| OLD | NEW |