mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 02:35:01 +00:00
Fix issue 18646.
Add regression test. R=hausner@google.com Review URL: https://codereview.chromium.org//291303006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36448 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
39ba6367e7
commit
5d277649fd
|
@ -13838,7 +13838,7 @@ bool Type::IsInstantiated(GrowableObjectArray* trail) const {
|
|||
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 @@ bool Type::IsInstantiated(GrowableObjectArray* trail) const {
|
|||
// 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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue