summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/test-func-name-inference.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/test-func-name-inference.cc')
-rw-r--r--deps/v8/test/cctest/test-func-name-inference.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/deps/v8/test/cctest/test-func-name-inference.cc b/deps/v8/test/cctest/test-func-name-inference.cc
index e5ccbc3275..783ab3da83 100644
--- a/deps/v8/test/cctest/test-func-name-inference.cc
+++ b/deps/v8/test/cctest/test-func-name-inference.cc
@@ -555,3 +555,31 @@ TEST(ReturnAnonymousFunction) {
script->Run(CcTest::isolate()->GetCurrentContext()).ToLocalChecked();
CheckFunctionName(script, "return 2012", "");
}
+
+TEST(IgnoreExtendsClause) {
+ CcTest::InitializeVM();
+ v8::HandleScope scope(CcTest::isolate());
+
+ v8::Local<v8::Script> script =
+ Compile(CcTest::isolate(),
+ "(function() {\n"
+ " var foo = {};\n"
+ " foo.C = class {}\n"
+ " class D extends foo.C {}\n"
+ " foo.bar = function() { return 1; };\n"
+ "})()");
+ script->Run(CcTest::isolate()->GetCurrentContext()).ToLocalChecked();
+ 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", "");
+}