Commit 214e5cee authored by Adam Klein's avatar Adam Klein Committed by Commit Bot

[cctest] Add FuncNameInferrer coverage for arrow functions

Bug: v8:6822
Change-Id: If6a22e19873b1f3196a4ece48fc79859257ce41d
Reviewed-on: https://chromium-review.googlesource.com/804152Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50118}
parent 4d07a89d
...@@ -571,3 +571,15 @@ TEST(IgnoreExtendsClause) { ...@@ -571,3 +571,15 @@ TEST(IgnoreExtendsClause) {
script->Run(CcTest::isolate()->GetCurrentContext()).ToLocalChecked(); script->Run(CcTest::isolate()->GetCurrentContext()).ToLocalChecked();
CheckFunctionName(script, "return 1", "foo.bar"); CheckFunctionName(script, "return 1", "foo.bar");
} }
TEST(ParameterAndArrow) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Script> script = Compile(CcTest::isolate(),
"(function(param) {\n"
" (() => { return 2017 })();\n"
"})()");
script->Run(CcTest::isolate()->GetCurrentContext()).ToLocalChecked();
CheckFunctionName(script, "return 2017", "");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment