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

Unified Diff: runtime/vm/object.cc

Issue 246293008: Do not ignore side effects of a type test or type cast as expression, such (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/intermediate_language.cc ('k') | tests/language/language_analyzer.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 35282)
+++ runtime/vm/object.cc (working copy)
@@ -14201,7 +14201,8 @@
if (bounded_type.IsSubtypeOf(upper_bound, bound_error)) {
return true;
}
- if (bound_error->IsNull()) {
+ // Set bound_error if the caller is interested and if this is the first error.
+ if ((bound_error != NULL) && bound_error->IsNull()) {
// Report the bound error only if both the bounded type and the upper bound
// are instantiated. Otherwise, we cannot tell yet it is a bound error.
if (bounded_type.IsInstantiated() && upper_bound.IsInstantiated()) {
@@ -14430,7 +14431,8 @@
bound_error,
trail);
}
- if (FLAG_enable_type_checks && bound_error->IsNull()) {
+ if (FLAG_enable_type_checks &&
+ (bound_error != NULL) && bound_error->IsNull()) {
AbstractType& upper_bound = AbstractType::Handle(bound());
ASSERT(!upper_bound.IsObjectType() && !upper_bound.IsDynamicType());
const TypeParameter& type_param = TypeParameter::Handle(type_parameter());
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | tests/language/language_analyzer.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698