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

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
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 29871)
+++ runtime/vm/object.cc (working copy)
@@ -11439,8 +11439,11 @@
Error* bound_error) const {
ASSERT(IsResolved());
ASSERT(other.IsResolved());
- ASSERT(!IsMalformed());
- ASSERT(!other.IsMalformed());
+ if (IsMalformed() || other.IsMalformed()) {
+ // Caller must handle malformed types and not call this kIsSubtypeOf test.
hausner 2013/11/05 17:45:17 the comment and the assertion mention different te
regis 2013/11/05 18:05:11 I rewrote the comment.
+ 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

Powered by Google App Engine
This is Rietveld 408576698