| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 2ce486b3f00f509a8eec81bd2414fcf498e7bfe0..7e1ebb59c873d6f7854e60e0ec9a8f63ec636f63 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -17236,7 +17236,9 @@ bool BoundedType::IsRecursive() const {
|
|
|
|
|
| void BoundedType::set_type(const AbstractType& value) const {
|
| - ASSERT(value.IsFinalized() || value.IsBeingFinalized());
|
| + ASSERT(value.IsFinalized() ||
|
| + value.IsBeingFinalized() ||
|
| + value.IsTypeParameter());
|
| ASSERT(!value.IsMalformed());
|
| StorePointer(&raw_ptr()->type_, value.raw());
|
| }
|
| @@ -17305,8 +17307,8 @@ RawAbstractType* BoundedType::InstantiateFrom(
|
| return bounded_type.raw();
|
| }
|
| const TypeParameter& type_param = TypeParameter::Handle(type_parameter());
|
| - if (instantiated_bounded_type.IsBeingFinalized() ||
|
| - instantiated_upper_bound.IsBeingFinalized() ||
|
| + if (!instantiated_bounded_type.IsFinalized() ||
|
| + !instantiated_upper_bound.IsFinalized() ||
|
| (!type_param.CheckBound(instantiated_bounded_type,
|
| instantiated_upper_bound,
|
| bound_error,
|
| @@ -17315,7 +17317,8 @@ RawAbstractType* BoundedType::InstantiateFrom(
|
| bound_error->IsNull())) {
|
| // We cannot determine yet whether the bounded_type is below the
|
| // upper_bound, because one or both of them is still being finalized or
|
| - // uninstantiated.
|
| + // uninstantiated. For example, instantiated_bounded_type may be the
|
| + // still unfinalized cloned type parameter of a mixin application class.
|
| ASSERT(instantiated_bounded_type.IsBeingFinalized() ||
|
| instantiated_upper_bound.IsBeingFinalized() ||
|
| !instantiated_bounded_type.IsInstantiated() ||
|
|
|