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

Unified Diff: test/mjsunit/regress/regress-1199637.js

Issue 1819123002: Remove support for legacy const, part 1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased, deleted one more file Created 4 years, 9 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/mjsunit/regress/regress-1182832.js ('k') | test/mjsunit/regress/regress-1201933.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-1199637.js
diff --git a/test/mjsunit/regress/regress-1199637.js b/test/mjsunit/regress/regress-1199637.js
index 34ab5144a25a56f04e6dd1167fcb474bd80684cb..ae7c5e03f02beff80cbed561ad4de2b7434a461f 100644
--- a/test/mjsunit/regress/regress-1199637.js
+++ b/test/mjsunit/regress/regress-1199637.js
@@ -25,13 +25,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --legacy-const
+// Flags: --allow-natives-syntax
-// Make sure that we can introduce global variables (using
-// both var and const) that shadow even READ_ONLY variables
-// in the prototype chain.
-const NONE = 0;
-const READ_ONLY = 1;
+// Make sure that we can introduce global variables that shadow even
+// READ_ONLY variables in the prototype chain.
+var NONE = 0;
+var READ_ONLY = 1;
// Use DeclareGlobal...
%AddNamedProperty(this.__proto__, "a", 1234, NONE);
@@ -41,7 +40,7 @@ assertEquals(5678, a);
%AddNamedProperty(this.__proto__, "b", 1234, NONE);
assertEquals(1234, b);
-eval("const b = 5678;");
+eval("var b = 5678;");
assertEquals(5678, b);
%AddNamedProperty(this.__proto__, "c", 1234, READ_ONLY);
@@ -51,7 +50,7 @@ assertEquals(5678, c);
%AddNamedProperty(this.__proto__, "d", 1234, READ_ONLY);
assertEquals(1234, d);
-eval("const d = 5678;");
+eval("var d = 5678;");
assertEquals(5678, d);
// Use DeclareContextSlot...
@@ -62,7 +61,7 @@ assertEquals(5678, x);
%AddNamedProperty(this.__proto__, "y", 1234, NONE);
assertEquals(1234, y);
-eval("with({}) { const y = 5678; }");
+eval("with({}) { var y = 5678; }");
assertEquals(5678, y);
%AddNamedProperty(this.__proto__, "z", 1234, READ_ONLY);
@@ -72,5 +71,5 @@ assertEquals(5678, z);
%AddNamedProperty(this.__proto__, "w", 1234, READ_ONLY);
assertEquals(1234, w);
-eval("with({}) { const w = 5678; }");
+eval("with({}) { var w = 5678; }");
assertEquals(5678, w);
« no previous file with comments | « test/mjsunit/regress/regress-1182832.js ('k') | test/mjsunit/regress/regress-1201933.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698