Index: runtime/vm/class_finalizer.cc |
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc |
index 13ac6751d3612cac1c4d2e1a3ea87e1228f3a7be..f6d693b4c28aa1e478c73234cce9cc15e8e29a4f 100644 |
--- a/runtime/vm/class_finalizer.cc |
+++ b/runtime/vm/class_finalizer.cc |
@@ -591,7 +591,11 @@ void ClassFinalizer::ResolveType(const Class& cls, const AbstractType& type) { |
// The parent function, owner, and token position of a shared |
// canonical function type are meaningless, since the canonical |
// representent is picked arbitrarily. |
- signature.set_parent_function(Function::Handle()); |
+ // The parent function is however still required to finalize function |
+ // type parameters when the function has a generic parent. |
+ if (!signature.HasGenericParent()) { |
+ signature.set_parent_function(Function::Handle()); |
+ } |
// TODO(regis): As long as we support metadata in typedef signatures, |
// we cannot reset these fields used to reparse a typedef. |
// Note that the scope class of a typedef function type is always |