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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 16101007: Implement LibraryMirror.metadata. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix issues found during testing. Created 7 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
Index: dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 1ea7a23e8d21d4eccf6346b944dabd76a0547fcc..9ba4c1542e62e9abd119b90c49bbbfedb16ceaec 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -594,6 +594,15 @@ class LibraryElementX extends ElementX implements LibraryElement {
LibraryElement get declaration => super.declaration;
LibraryElement get implementation => super.implementation;
+ Link<MetadataAnnotation> get metadata {
+ return (libraryTag == null) ? super.metadata : libraryTag.metadata;
+ }
+
+ set metadata(value) {
+ // The metadata is stored on the library name.
kasperl 2013/05/30 13:16:39 name -> tag?
ahe 2013/05/30 13:28:45 Done.
+ throw new SpannableAssertionFailure(this, 'Cannot set metadata on Library');
+ }
+
CompilationUnitElement getCompilationUnit() => entryCompilationUnit;
void addCompilationUnit(CompilationUnitElement element) {

Powered by Google App Engine
This is Rietveld 408576698