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

Unified Diff: pkg/compiler/lib/src/parser/element_listener.dart

Issue 1504763003: Make NamedMixinApplicationElementX and EnumClassElementX implement DeclarationSite. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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/modelx.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/parser/element_listener.dart
diff --git a/pkg/compiler/lib/src/parser/element_listener.dart b/pkg/compiler/lib/src/parser/element_listener.dart
index 0cdf72ed1dd720c6c44d70f65d949e73449ad4de..aa525be039605bf63abcea3c5016bffcb33271b2 100644
--- a/pkg/compiler/lib/src/parser/element_listener.dart
+++ b/pkg/compiler/lib/src/parser/element_listener.dart
@@ -18,7 +18,7 @@ import '../elements/modelx.dart' show
EnumClassElementX,
FieldElementX,
LibraryElementX,
- MixinApplicationElementX,
+ NamedMixinApplicationElementX,
VariableList;
import '../native/native.dart' as native;
import '../string_validator.dart' show
@@ -278,9 +278,8 @@ class ElementListener extends Listener {
int id = idGenerator();
Element enclosing = compilationUnitElement;
- pushElement(new MixinApplicationElementX(name.source, enclosing, id,
- namedMixinApplication,
- modifiers));
+ pushElement(new NamedMixinApplicationElementX(
+ name.source, enclosing, id, namedMixinApplication));
rejectBuiltInIdentifier(name);
}
@@ -603,7 +602,9 @@ class ElementListener extends Listener {
reportFatalError(node, message);
}
- void pushElement(Element element) {
+ void pushElement(ElementX element) {
+ assert(invariant(element, element.declarationSite != null,
+ message: 'Missing declaration site for $element.'));
popMetadata(element);
compilationUnitElement.addMember(element, reporter);
}
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.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