| 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 9f96d7d7ca2beab4cbe7d49a62f7c7c6a9e9eef4..928c533f3b31e86b567cb95da10377cda995c6f9 100644
|
| --- a/runtime/vm/flow_graph_type_propagator.cc
|
| +++ b/runtime/vm/flow_graph_type_propagator.cc
|
| @@ -604,7 +604,7 @@ bool CompileType::CanComputeIsInstanceOf(const AbstractType& type,
|
| const AbstractType& compile_type = *ToAbstractType();
|
|
|
| // The compile-type of a value should never be void. The result of a void
|
| - // function must always be null, which wass checked to be null at the return
|
| + // function must always be null, which was checked to be null at the return
|
| // statement inside the function.
|
| ASSERT(!compile_type.IsVoidType());
|
|
|
| @@ -612,13 +612,13 @@ bool CompileType::CanComputeIsInstanceOf(const AbstractType& type,
|
| return false;
|
| }
|
|
|
| - // The Null type is only a subtype of Object and of dynamic.
|
| + // The null instance is an instance of Null, of Object, and of dynamic.
|
| // Functions that do not explicitly return a value, implicitly return null,
|
| // except generative constructors, which return the object being constructed.
|
| // It is therefore acceptable for void functions to return null.
|
| if (compile_type.IsNullType()) {
|
| *is_instance = is_nullable || type.IsObjectType() || type.IsDynamicType() ||
|
| - type.IsVoidType();
|
| + type.IsNullType() || type.IsVoidType();
|
| return true;
|
| }
|
|
|
|
|