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

Unified Diff: runtime/lib/mirrors.cc

Issue 1890013002: Fix mirrors to keep typedef as scope class of function types (fixes #26187). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comment Created 4 years, 8 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 | « no previous file | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 40efc283c9d7cdfd56d2e07404124c037fcff2d8..d10e066d9ce2b98ef32b2de3a5b17a3f0d5ecac7 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -2068,18 +2068,7 @@ DEFINE_NATIVE_ENTRY(TypedefMirror_referent, 1) {
ASSERT(cls.IsTypedefClass());
const Function& sig_func = Function::Handle(cls.signature_function());
Type& referent_type = Type::Handle(sig_func.SignatureType());
- // If the scope class of the function type is not generic, replace it with
- // Closure class (Function::SignatureType() keeps it).
ASSERT(cls.raw() == referent_type.type_class());
- if (!cls.IsGeneric()) {
- referent_type = Type::New(
- Class::Handle(Isolate::Current()->object_store()->closure_class()),
- TypeArguments::Handle(referent_type.arguments()),
- referent_type.token_pos());
- referent_type.set_signature(sig_func);
- referent_type ^= ClassFinalizer::FinalizeType(
- cls, referent_type, ClassFinalizer::kCanonicalize);
- }
referent_type ^= InstantiateType(referent_type, type);
return CreateFunctionTypeMirror(referent_type);
}
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698