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

Unified Diff: runtime/vm/object.cc

Issue 291303006: Fix issue 18646. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 36446)
+++ runtime/vm/object.cc (working copy)
@@ -13838,7 +13838,7 @@
return true;
}
const TypeArguments& args = TypeArguments::Handle(arguments());
- const intptr_t num_type_args = args.Length();
+ intptr_t num_type_args = args.Length();
intptr_t len = num_type_args; // Check the full vector of type args.
ASSERT(num_type_args > 0);
// This type is not instantiated if it refers to type parameters.
@@ -13849,8 +13849,10 @@
// arguments and not just at the type parameters.
if (HasResolvedTypeClass()) {
const Class& cls = Class::Handle(type_class());
+ len = cls.NumTypeArguments();
+ ASSERT(num_type_args >= len); // The vector may be longer than necessary.
+ num_type_args = len;
len = cls.NumTypeParameters(); // Check the type parameters only.
- ASSERT(num_type_args == cls.NumTypeArguments());
}
return (len == 0) || args.IsSubvectorInstantiated(num_type_args - len, len);
}
« 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