Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Unified Diff: runtime/vm/object.cc

Issue 1654273003: Fix typedef cycle check (fixes #25620). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | tests/language/regress_25620_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index ba54f54937c5c458ba0d48dfd9aa4307dc7fda9b..8e56b46484b0590c11eff9a40c2e676c8b1b95c1 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -15709,9 +15709,10 @@ RawString* AbstractType::BuildName(NameVisibility name_visibility) const {
Class& cls = Class::Handle(zone);
if (IsFunctionType()) {
cls = type_class();
- if (!cls.IsTypedefClass()) {
- const Function& signature_function = Function::Handle(
- zone, FunctionType::Cast(*this).signature());
+ const Function& signature_function = Function::Handle(
+ zone, FunctionType::Cast(*this).signature());
+ if (!cls.IsTypedefClass() ||
+ (cls.signature_function() != signature_function.raw())) {
if (!IsFinalized() || IsBeingFinalized() || IsMalformed()) {
return signature_function.UserVisibleSignature();
}
@@ -17141,9 +17142,11 @@ const char* FunctionType::ToCString() const {
const Class& scope_cls = Class::Handle(scope_class());
const TypeArguments& type_arguments = TypeArguments::Handle(arguments());
const Function& signature_function = Function::Handle(signature());
- const String& signature_string = String::Handle(
- signature_function.InstantiatedSignatureFrom(type_arguments,
- kInternalName));
+ const String& signature_string = IsFinalized() ?
+ String::Handle(
+ signature_function.InstantiatedSignatureFrom(type_arguments,
+ kInternalName)) :
+ String::Handle(signature_function.Signature());
if (scope_cls.IsClosureClass()) {
ASSERT(arguments() == TypeArguments::null());
return OS::SCreate(
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | tests/language/regress_25620_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698