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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 13046009: Fix issue 9442. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/function_type_alias8_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
===================================================================
--- runtime/vm/flow_graph_type_propagator.cc (revision 20537)
+++ runtime/vm/flow_graph_type_propagator.cc (working copy)
@@ -407,14 +407,18 @@
cid_ = kDynamicCid;
}
- if (ToAbstractType()->IsMoreSpecificThan(*other->ToAbstractType(), NULL)) {
+ Error& malformed_error = Error::Handle();
+ if (ToAbstractType()->IsMoreSpecificThan(*other->ToAbstractType(),
+ &malformed_error)) {
type_ = other->ToAbstractType();
- } else if (ToAbstractType()->IsMoreSpecificThan(*ToAbstractType(), NULL)) {
+ } else if (ToAbstractType()->IsMoreSpecificThan(*ToAbstractType(),
+ &malformed_error)) {
// Nothing to do.
} else {
// Can't unify.
type_ = &Type::ZoneHandle(Type::DynamicType());
}
+ ASSERT(malformed_error.IsNull());
}
@@ -597,7 +601,10 @@
return IsNull();
}
- return ToAbstractType()->IsMoreSpecificThan(other, NULL);
+ Error& malformed_error = Error::Handle();
+ const bool is_more_specific =
+ ToAbstractType()->IsMoreSpecificThan(other, &malformed_error);
+ return malformed_error.IsNull() && is_more_specific;
}
« no previous file with comments | « no previous file | tests/language/function_type_alias8_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698