Index: runtime/vm/flow_graph_type_propagator.cc |
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc |
index 7c83e391699f9a0f7fba33a0768aafdae2d186c9..d3242c9d672d3d5075ce52b6a5a33d1c0ffd6110 100644 |
--- a/runtime/vm/flow_graph_type_propagator.cc |
+++ b/runtime/vm/flow_graph_type_propagator.cc |
@@ -981,8 +981,7 @@ CompileType AllocateObjectInstr::ComputeType() const { |
ASSERT(cls().id() == kClosureCid); |
return CompileType(CompileType::kNonNullable, |
kClosureCid, |
- &FunctionType::ZoneHandle( |
- closure_function().SignatureType())); |
+ &Type::ZoneHandle(closure_function().SignatureType())); |
} |
// TODO(vegorov): Incorporate type arguments into the returned type. |
return CompileType::FromCid(cls().id()); |
@@ -1009,8 +1008,9 @@ CompileType LoadFieldInstr::ComputeType() const { |
const AbstractType* abstract_type = NULL; |
if (Isolate::Current()->type_checks() && |
- type().HasResolvedTypeClass() && |
- !Field::IsExternalizableCid(Class::Handle(type().type_class()).id())) { |
+ (type().IsFunctionType() || |
+ (type().HasResolvedTypeClass() && |
+ !Field::IsExternalizableCid(Class::Handle(type().type_class()).id())))) { |
abstract_type = &type(); |
} |