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

Unified Diff: runtime/vm/parser.cc

Issue 26888005: Disallow extending a malformed type (issue 13940). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/object.cc ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 28487)
+++ runtime/vm/parser.cc (working copy)
@@ -3805,6 +3805,13 @@
ConsumeToken();
const intptr_t type_pos = TokenPos();
super_type = ParseType(ClassFinalizer::kResolveTypeParameters);
+ if (super_type.IsDynamicType()) {
+ // The string 'dynamic' is not resolved yet at this point, but a malformed
+ // type mapped to dynamic can be encountered here.
+ ErrorMsg(type_pos,
+ "class '%s' may not extend a malformed type",
+ class_name.ToCString());
+ }
if (super_type.IsTypeParameter()) {
ErrorMsg(type_pos,
"class '%s' may not extend type parameter '%s'",
« no previous file with comments | « runtime/vm/object.cc ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698