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

Unified Diff: runtime/vm/parser.cc

Issue 23190003: ClassMirror.mixin (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 4 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') | sdk/lib/mirrors/mirrors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 1c8cbae4361cd34df3c9e640e01247fd17629818..047ef05e45f304fa594969f3b8fac402b9386fed 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -3883,6 +3883,7 @@ void Parser::ParseMixinTypedef(const GrowableObjectArray& pending_classes,
}
const Class& mixin_application =
Class::Handle(Class::New(class_name, script_, classname_pos));
+ mixin_application.set_is_mixin_typedef();
library_.AddClass(mixin_application);
set_current_class(mixin_application);
ParseTypeParameters(mixin_application);
@@ -3909,8 +3910,9 @@ void Parser::ParseMixinTypedef(const GrowableObjectArray& pending_classes,
}
type = ParseMixins(type);
- // TODO(hausner): treat the mixin application as an alias, not as a base
- // class whose super class is the mixin application!
+ // TODO(12773): Treat the mixin application as an alias, not as a base
+ // class whose super class is the mixin application! This is difficult because
+ // of issues involving subsitution of type parameters
mixin_application.set_super_type(type);
mixin_application.set_is_synthesized_class();
@@ -3918,6 +3920,9 @@ void Parser::ParseMixinTypedef(const GrowableObjectArray& pending_classes,
// too early to call 'AddImplicitConstructor(mixin_application)' here,
// because this class should be lazily compiled.
if (CurrentToken() == Token::kIMPLEMENTS) {
+ // At this point, the mixin_application alias already has an interface, but
+ // ParseInterfaceList will add to the list and not lose the one already
+ // there.
ParseInterfaceList(mixin_application);
}
ExpectSemicolon();
« no previous file with comments | « runtime/vm/object.cc ('k') | sdk/lib/mirrors/mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698