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

Unified Diff: test/mjsunit/es6/arrow-functions.js

Issue 1389313003: [parser] fix token end position for regexp literals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test Created 5 years, 2 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 | « src/scanner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/arrow-functions.js
diff --git a/test/mjsunit/es6/arrow-functions.js b/test/mjsunit/es6/arrow-functions.js
index 33147ab3971b3a28581818d4b3aa4b2cf67ecc9b..c1b375a4112685c615ff8b4125de9a8ec9b1fb87 100644
--- a/test/mjsunit/es6/arrow-functions.js
+++ b/test/mjsunit/es6/arrow-functions.js
@@ -68,3 +68,16 @@ assertEquals([5, 10], fives);
assertThrows(function() { return arrowFn.caller; }, TypeError);
assertThrows(function() { arrowFn.caller = {}; }, TypeError);
})();
+
+
+// v8:4474
+(function testConciseBodyReturnsRegexp() {
+ var arrow1 = () => /foo/
+ var arrow2 = () => /foo/;
+ var arrow3 = () => /foo/i
+ var arrow4 = () => /foo/i;
+ assertEquals(arrow1.toString(), "() => /foo/");
+ assertEquals(arrow2.toString(), "() => /foo/");
+ assertEquals(arrow3.toString(), "() => /foo/i");
+ assertEquals(arrow4.toString(), "() => /foo/i");
+});
« no previous file with comments | « src/scanner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698