Index: test/mjsunit/es6/tail-call.js |
diff --git a/test/mjsunit/es6/tail-call.js b/test/mjsunit/es6/tail-call.js |
index 3df53230ff25ecd57bf377b81ea8dd8d72551a23..318519b3551c0b939e9fdcbfef883c11c384708f 100644 |
--- a/test/mjsunit/es6/tail-call.js |
+++ b/test/mjsunit/es6/tail-call.js |
@@ -392,3 +392,24 @@ function f_153(expected_call_stack, a) { |
%OptimizeFunctionOnNextCall(test); |
test(); |
})(); |
+ |
+ |
+// Test tail calls from arrow functions. |
+(function () { |
+ function g1(a) { |
+ return (() => { return f_153([f_153, test]); })(); |
+ } |
+ |
+ function g2(a) { |
+ return (() => f_153([f_153, test]))(); |
+ } |
+ |
+ function test() { |
+ assertEquals(153, g1()); |
+ assertEquals(153, g2()); |
+ } |
+ test(); |
+ test(); |
+ %OptimizeFunctionOnNextCall(test); |
+ test(); |
+})(); |