Index: test/mjsunit/es6/super.js |
diff --git a/test/mjsunit/es6/super.js b/test/mjsunit/es6/super.js |
index 4c80ce7711848afe941aaca87e95c3cd88521a4b..a101ea896b0a7d1d1f213e26105252a8039205f2 100644 |
--- a/test/mjsunit/es6/super.js |
+++ b/test/mjsunit/es6/super.js |
@@ -2213,3 +2213,35 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44); |
let d = new Derived(42); |
assertSame(42, d.x); |
})(); |
+ |
+(function TestNullSuperPropertyLoad() { |
+ var obj = { |
+ __proto__: null, |
+ named() { return super.x }, |
+ keyed() { return super[5] } |
+ }; |
+ assertThrows(obj.named, TypeError); |
+ assertThrows(obj.keyed, TypeError); |
+ class C extends null { |
+ named() { return super.x } |
+ keyed() { return super[5] } |
+ } |
+ assertThrows(C.prototype.named, TypeError); |
+ assertThrows(C.prototype.keyed, TypeError); |
+})(); |
+ |
+(function TestNullSuperPropertyStore() { |
+ var obj = { |
+ __proto__: null, |
+ named() { super.x = 42 }, |
+ keyed() { super[5] = 42 } |
+ }; |
+ assertThrows(obj.named, TypeError); |
+ assertThrows(obj.keyed, TypeError); |
+ class C extends null { |
+ named() { super.x = 42 } |
+ keyed() { super[5] = 42 } |
+ } |
+ assertThrows(C.prototype.named, TypeError); |
+ assertThrows(C.prototype.keyed, TypeError); |
+})(); |