Index: test/cctest/test-func-name-inference.cc |
diff --git a/test/cctest/test-func-name-inference.cc b/test/cctest/test-func-name-inference.cc |
index 4b16c031d9bceb7cc058b8b872e2775f74f1fb0e..8c43bbfa54e285ebb1ca6d38f490347f32980d55 100644 |
--- a/test/cctest/test-func-name-inference.cc |
+++ b/test/cctest/test-func-name-inference.cc |
@@ -141,6 +141,19 @@ TEST(LocalVar) { |
CheckFunctionName(script, "return 2", "fun2"); |
} |
+TEST(ObjectProperty) { |
+ CcTest::InitializeVM(); |
+ v8::HandleScope scope(CcTest::isolate()); |
+ |
+ v8::Local<v8::Script> script = |
+ Compile(CcTest::isolate(), |
+ "var obj = {\n" |
+ " fun1: function() { return 1; },\n" |
+ " fun2: class { constructor() { return 2; } }\n" |
+ "}"); |
+ CheckFunctionName(script, "return 1", "obj.fun1"); |
+ CheckFunctionName(script, "return 2", "obj.fun2"); |
+} |
TEST(InConstructor) { |
CcTest::InitializeVM(); |