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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 1886633002: Properly handle unfinalized type parameters of generic mixins (fixes #26230). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/object.cc » ('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 1db03051a164a076847afb7bb13c2a246216395d..1a7f6cf2fb3f07d134bbc0b5c43c512577f239d3 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -993,13 +993,16 @@ void ClassFinalizer::CheckTypeArgumentBounds(const Class& cls,
!(type_arg.Equals(type_param) &&
instantiated_bound.Equals(declared_bound))) {
// If type_arg is a type parameter, its declared bound may not be
- // resolved yet.
+ // finalized yet.
if (type_arg.IsTypeParameter()) {
const Class& type_arg_cls = Class::Handle(
TypeParameter::Cast(type_arg).parameterized_class());
AbstractType& bound = AbstractType::Handle(
TypeParameter::Cast(type_arg).bound());
- ResolveType(type_arg_cls, bound);
+ if (!bound.IsFinalized() && !bound.IsBeingFinalized()) {
+ bound = FinalizeType(type_arg_cls, bound, kCanonicalize);
+ TypeParameter::Cast(type_arg).set_bound(bound);
+ }
}
// This may be called only if type needs to be finalized, therefore
// seems OK to allocate finalized types in old space.
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698