Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2708)

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 14034011: Ensure that type of the AssertAssignable instruction is recomputed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/language/type_propagation_assert_assignable_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ec1a880c9c464201b8496429ffa9a34930731961..827f9e47b194bc5f01b4835f50c9823b4ccfd580 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -734,11 +734,9 @@ bool AssertAssignableInstr::RecomputeType() {
return false;
}
- if (value_type->IsMoreSpecificThan(dst_type())) {
- return UpdateType(*value_type);
- }
-
- return false;
+ return UpdateType(value_type->IsMoreSpecificThan(dst_type())
+ ? *value_type
+ : CompileType::FromAbstractType(dst_type()));
}
« no previous file with comments | « no previous file | tests/language/type_propagation_assert_assignable_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698