Index: test/mjsunit/harmony/new-target.js |
diff --git a/test/mjsunit/harmony/new-target.js b/test/mjsunit/harmony/new-target.js |
index fa5b37282018d2615a83dc05cfff0f4738aefa38..394e93901299129ce20c334e282c3f1eab4e9218 100644 |
--- a/test/mjsunit/harmony/new-target.js |
+++ b/test/mjsunit/harmony/new-target.js |
@@ -384,3 +384,11 @@ |
function f6() { with ({'new.target': 42}) return new.target } |
assertSame(f6, new f6); |
})(); |
+ |
+ |
+(function TestEarlyErrors() { |
+ assertThrows(function() { Function("new.target = 42"); }, ReferenceError); |
rossberg
2015/08/13 11:13:54
Could add a case for at least one compound assignm
adamk
2015/08/13 17:05:44
Done. Added a few more tests here.
|
+ assertThrows(function() { Function("new.target--"); }, ReferenceError); |
+ assertThrows(function() { Function("--new.target"); }, ReferenceError); |
+ assertThrows(function() { Function("for (new.target of {});"); }, ReferenceError); |
+})(); |