Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: test/mjsunit/strict-mode.js

Issue 6516003: Strict mode delete of unqualified identifier. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/es5conform/es5conform.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/strict-mode.js
diff --git a/test/mjsunit/strict-mode.js b/test/mjsunit/strict-mode.js
index 6b775fcb049409469a423e7ad58a1fd7582cb644..8baaea9429e381bc67215746218683ddb0875939 100644
--- a/test/mjsunit/strict-mode.js
+++ b/test/mjsunit/strict-mode.js
@@ -264,6 +264,14 @@ CheckStrictMode("function strict() { print(--arguments); }", SyntaxError);
CheckStrictMode("function strict() { var x = --eval; }", SyntaxError);
CheckStrictMode("function strict() { var x = --arguments; }", SyntaxError);
+// Delete of an unqialified identifier
+CheckStrictMode("delete unqualified;", SyntaxError);
+CheckStrictMode("function strict() { delete unqualified; }", SyntaxError);
+CheckStrictMode("function function_name() { delete function_name; }", SyntaxError);
Mads Ager (chromium) 2011/02/14 09:00:12 Split these lines to keep within 80 char?
Martin Maly 2011/02/14 18:32:12 Done.
+CheckStrictMode("function strict(parameter) { delete parameter; }", SyntaxError);
+CheckStrictMode("function strict() { var variable; delete variable; }", SyntaxError);
+CheckStrictMode("var variable; delete variable;", SyntaxError);
+
// Prefix unary operators other than delete, ++, -- are valid in strict mode
(function StrictModeUnaryOperators() {
"use strict";
« no previous file with comments | « test/es5conform/es5conform.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698