Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 0ed2dfd86b7f8da7a294d5e8f786390e7d34dd72..df267db8e78a82d59f3337a0cde74a91f5778972 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -6245,7 +6245,7 @@ RawFunction* Function::ImplicitClosureFunction() const { |
} |
ASSERT(!IsSignatureFunction() && !IsClosureFunction()); |
// Create closure function. |
- const String& closure_name = Symbols::ImplicitClosure(); |
+ const String& closure_name = String::Handle(name()); |
const Function& closure_function = Function::Handle( |
NewClosureFunction(closure_name, *this, token_pos())); |
@@ -6579,7 +6579,7 @@ RawString* Function::QualifiedUserVisibleName() const { |
const Class& cls = Class::Handle(Owner()); |
if (IsClosureFunction()) { |
- if (IsLocalFunction()) { |
+ if (IsLocalFunction() && !IsImplicitClosureFunction()) { |
const Function& parent = Function::Handle(parent_function()); |
tmp = parent.QualifiedUserVisibleName(); |
} else { |