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

Unified Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 2017903002: Improve equivalence testing of unnamed mixin applications. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 7 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 | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/resolution/class_hierarchy.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 233014ab41d5a36fd0c9fa91f13839b945215d02..aed5d0cde98b05ddd281e316dc6ab80eaebd63ac 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -2988,7 +2988,6 @@ abstract class MixinApplicationElementX extends BaseClassElementX
ClassElement get mixin => mixinType != null ? mixinType.element : null;
bool get isMixinApplication => true;
- bool get isUnnamedMixinApplication => node is! NamedMixinApplication;
bool get hasConstructor => !constructors.isEmpty;
bool get hasLocalScopeMembers => !constructors.isEmpty;
@@ -3046,14 +3045,20 @@ class NamedMixinApplicationElementX extends MixinApplicationElementX
Modifiers get modifiers => node.modifiers;
DeclarationSite get declarationSite => this;
+
+ ClassElement get subclass => null;
}
class UnnamedMixinApplicationElementX extends MixinApplicationElementX {
final Node node;
+ final ClassElement subclass;
UnnamedMixinApplicationElementX(
- String name, CompilationUnitElement enclosing, int id, this.node)
- : super(name, enclosing, id);
+ String name, ClassElement subclass, int id, this.node)
+ : this.subclass = subclass,
+ super(name, subclass.compilationUnit, id);
+
+ bool get isUnnamedMixinApplication => true;
bool get isAbstract => true;
}
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/resolution/class_hierarchy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698