Index: test/mjsunit/harmony/async-arrow-lexical-new.target.js |
diff --git a/test/mjsunit/harmony/async-arrow-lexical-new.target.js b/test/mjsunit/harmony/async-arrow-lexical-new.target.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b460b8d6be2c7567e4eb6d50ad2eb2f399051898 |
--- /dev/null |
+++ b/test/mjsunit/harmony/async-arrow-lexical-new.target.js |
@@ -0,0 +1,16 @@ |
+// Copyright 2016 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Flags: --harmony-async-await |
+ |
+class BaseClass { |
+ constructor() { |
+ return async () => new.target; |
+ } |
+} |
+ |
+class ChildClass extends BaseClass {} |
+ |
+assertEqualsAsync(BaseClass, () => new BaseClass()()); |
+assertEqualsAsync(ChildClass, () => new ChildClass()()); |