Index: runtime/vm/flow_graph_builder.cc |
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc |
index bb52f8fa7cc0cf857c081b7598267eb3ddd4131a..5077e7d12dfcd051f4653a2a989c4fd7355febb2 100644 |
--- a/runtime/vm/flow_graph_builder.cc |
+++ b/runtime/vm/flow_graph_builder.cc |
@@ -1245,8 +1245,9 @@ bool EffectGraphVisitor::CanSkipTypeCheck(TokenPosition token_pos, |
return false; |
} |
- // Any type is more specific than the dynamic type and than the Object type. |
- if (dst_type.IsDynamicType() || dst_type.IsObjectType()) { |
+ // Any type is more specific than the dynamic type, the Object type, or void. |
+ if (dst_type.IsDynamicType() || dst_type.IsObjectType() || |
+ dst_type.IsVoidType()) { |
return true; |
} |