Index: runtime/vm/flow_graph_compiler_dbc.cc |
diff --git a/runtime/vm/flow_graph_compiler_dbc.cc b/runtime/vm/flow_graph_compiler_dbc.cc |
index 749d20a82c1104d20c11ea7bec02749f87bd0900..75bf2c54fa7547c9cb98eec14701d9117715e1ed 100644 |
--- a/runtime/vm/flow_graph_compiler_dbc.cc |
+++ b/runtime/vm/flow_graph_compiler_dbc.cc |
@@ -222,6 +222,9 @@ void FlowGraphCompiler::GenerateAssertAssignable(TokenPosition token_pos, |
SubtypeTestCache& test_cache = SubtypeTestCache::Handle(); |
if (!dst_type.IsVoidType() && dst_type.IsInstantiated()) { |
test_cache = SubtypeTestCache::New(); |
+ } else if (!dst_type.IsInstantiated() && |
+ (dst_type.IsTypeParameter() || dst_type.IsType())) { |
+ test_cache = SubtypeTestCache::New(); |
} |
if (is_optimizing()) { |