| Index: runtime/vm/flow_graph_compiler_arm.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_compiler_arm.cc (revision 26663)
|
| +++ runtime/vm/flow_graph_compiler_arm.cc (working copy)
|
| @@ -566,7 +566,7 @@
|
| const AbstractType& type,
|
| bool negate_result,
|
| LocationSummary* locs) {
|
| - ASSERT(type.IsFinalized() && !type.IsMalformed());
|
| + ASSERT(type.IsFinalized() && !type.IsMalformed() && !type.IsMalbounded());
|
|
|
| // Preserve instantiator (R2) and its type arguments (R1).
|
| __ PushList((1 << R1) | (1 << R2));
|
| @@ -652,7 +652,7 @@
|
| ASSERT(!dst_type.IsNull());
|
| ASSERT(dst_type.IsFinalized());
|
| // Assignable check is skipped in FlowGraphBuilder, not here.
|
| - ASSERT(dst_type.IsMalformed() ||
|
| + ASSERT(dst_type.IsMalformed() || dst_type.IsMalbounded() ||
|
| (!dst_type.IsDynamicType() && !dst_type.IsObjectType()));
|
| // Preserve instantiator (R2) and its type arguments (R1).
|
| __ PushList((1 << R1) | (1 << R2));
|
| @@ -668,9 +668,15 @@
|
| __ b(&is_assignable, EQ);
|
| }
|
|
|
| - // Generate throw new TypeError() if the type is malformed.
|
| - if (dst_type.IsMalformed()) {
|
| - const Error& error = Error::Handle(dst_type.malformed_error());
|
| + // Generate throw new TypeError() if the type is malformed or malbounded.
|
| + if (dst_type.IsMalformed() || dst_type.IsMalbounded()) {
|
| + Error& error = Error::Handle();
|
| + if (dst_type.IsMalformed()) {
|
| + error = dst_type.malformed_error();
|
| + } else {
|
| + const bool is_malbounded = dst_type.IsMalboundedWithError(&error);
|
| + ASSERT(is_malbounded);
|
| + }
|
| const String& error_message = String::ZoneHandle(
|
| Symbols::New(error.ToErrorCString()));
|
| __ PushObject(Object::ZoneHandle()); // Make room for the result.
|
|
|