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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 1653593002: Relax assert when applying a mixin application alias (fixes #25617). (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 | « no previous file | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index f97d6dc1856d6ff2f14218787e0716f7c5ff8fb8..8f705b21fa2cd19c4be8a926b970efe691d3dcca 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -1963,10 +1963,15 @@ void ClassFinalizer::ApplyMixinAppAlias(const Class& mixin_app_class,
const intptr_t num_super_type_params = super_class.NumTypeParameters();
AbstractType& type = AbstractType::Handle(zone);
// The instantiator is mapping finalized type parameters of mixin_class to
- // unfinalized type parameters of mixin_app_class.
- ASSERT(aliased_mixin_type.IsFinalized());
+ // unfinalized type parameters of mixin_app_class. Therefore, the type
+ // arguments of mixin_class_super_type must be finalized, since they get
+ // instantiated by this instantiator. Finalizing the types in mixin_class
+ // will finalize mixin_class_super_type.
+ // The aliased_mixin_type does not need to be finalized, but only resolved.
+ ASSERT(aliased_mixin_type.IsResolved());
const Class& aliased_mixin_type_class = Class::Handle(zone,
aliased_mixin_type.type_class());
+ FinalizeTypesInClass(mixin_class);
const intptr_t num_aliased_mixin_type_params =
aliased_mixin_type_class.NumTypeParameters();
ASSERT(inserted_class.NumTypeParameters() ==
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698