Index: test/mjsunit/es6/regress/regress-4097.js |
diff --git a/test/mjsunit/es6/regress/regress-4097.js b/test/mjsunit/es6/regress/regress-4097.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d74c62f4bf69a30862edbca2823cfe6d7253acb1 |
--- /dev/null |
+++ b/test/mjsunit/es6/regress/regress-4097.js |
@@ -0,0 +1,20 @@ |
+// Copyright 2015 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. |
+ |
+(function () { |
+ "use strict"; |
arv (Not doing code reviews)
2015/05/12 16:44:20
wrong indentation... use 2 spaces
Dmitry Lomov (no reviews)
2015/05/12 16:50:18
Done.
|
+ class A { |
+ s() { |
+ super.bla = 10; |
arv (Not doing code reviews)
2015/05/12 16:44:20
Can we also add tests for reading?
Dmitry Lomov (no reviews)
2015/05/12 16:50:17
Done.
|
+ } |
+ }; |
+ |
+ let a = new A(); |
+ (new A).s.call(a); |
+ assertEquals(10, a.bla); |
+ assertThrows(function() { (new A).s.call(undefined); }, TypeError); |
+ assertThrows(function() { (new A).s.call(42); }, TypeError); |
+ assertThrows(function() { (new A).s.call(null); }, TypeError); |
+ assertThrows(function() { (new A).s.call("abc"); }, TypeError); |
+})() |