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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 140913005: Make a type malbounded if one of its type arguments is malbounded, even if (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/co19/co19-runtime.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 31900)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -638,6 +638,15 @@
continue;
}
ASSERT(type_arg.IsFinalized());
+ if (type_arg.IsMalbounded()) {
+ // The type argument itself is already malbounded, independently of the
+ // declared bound, which may be Object.
+ // Propagate the bound error from the type argument to the type.
+ if (bound_error->IsNull()) {
+ *bound_error = type_arg.error();
+ ASSERT(!bound_error->IsNull());
+ }
+ }
cls_type_param = cls_type_params.TypeAt(i);
const TypeParameter& type_param = TypeParameter::Cast(cls_type_param);
ASSERT(type_param.IsFinalized());
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698