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

Unified Diff: runtime/vm/object.cc

Issue 1528523002: Finalizing an upper bound during a compile-time type test may lead to cycles. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | no next file » | 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 2799c1b0ebfefb6f71496345b5d20397c7c5ac16..f44c36539865db16ec85e89c1c206adcb1f01e76 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -15684,13 +15684,9 @@ bool AbstractType::TypeTest(TypeTestKind test_kind,
}
const AbstractType& bound = AbstractType::Handle(type_param.bound());
// We may be checking bounds at finalization time and can encounter
- // a still unfinalized bound.
- if (!bound.IsFinalized() && !bound.IsBeingFinalized()) {
- ClassFinalizer::FinalizeType(
- Class::Handle(type_param.parameterized_class()),
- bound,
- ClassFinalizer::kCanonicalize);
- type_param.set_bound(bound);
+ // a still unfinalized bound. Finalizing the bound here may lead to cycles.
+ if (!bound.IsFinalized()) {
+ return false; // TODO(regis): Return "maybe after instantiation".
}
if (bound.IsMoreSpecificThan(other, bound_error)) {
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698