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

Unified Diff: runtime/vm/object.cc

Issue 57133004: Complete latest spec changes regarding malformed types (see issue 14006). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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/flow_graph_type_propagator.cc ('k') | runtime/vm/parser.cc » ('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 29923)
+++ runtime/vm/object.cc (working copy)
@@ -11461,8 +11461,13 @@
Error* bound_error) const {
ASSERT(IsResolved());
ASSERT(other.IsResolved());
- ASSERT(!IsMalformed());
- ASSERT(!other.IsMalformed());
+ if (IsMalformed() || other.IsMalformed()) {
+ // Malformed types involved in subtype tests should be handled specially
+ // by the caller. Malformed types should only be encountered here in a
+ // more specific than test.
+ ASSERT(test_kind == kIsMoreSpecificThan);
+ return false;
+ }
// In case the type checked in a type test is malbounded, the code generator
// may compile a throw instead of a run time call performing the type check.
// However, in checked mode, a function type may include malbounded result
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698