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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 16451014: Update assertion regarding supertypes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index d0ffd9a7699e69a850c3d65afc99d721f6b505fd..95f6edf66847c00e75b51e90cd6dd3c8bb889abc 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -3336,10 +3336,17 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
void doApplyMixinTo(MixinApplicationElement mixinApplication,
DartType supertype,
DartType mixinType) {
- assert(mixinApplication.supertype == null);
- mixinApplication.supertype = supertype;
-
Node node = mixinApplication.parseNode(compiler);
+
+ if (mixinApplication.supertype != null) {
+ // [supertype] is not null if there was a cycle.
+ assert(invariant(node, compiler.compilationFailed));
+ supertype = mixinApplication.supertype;
+ assert(invariant(node, supertype.element == compiler.objectClass));
+ } else {
+ mixinApplication.supertype = supertype;
+ }
+
// Named mixin application may have an 'implements' clause.
NamedMixinApplication namedMixinApplication =
node.asNamedMixinApplication();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698