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

Unified Diff: lib/compiler/implementation/elements/elements.dart

Issue 10694067: Make patch file import declarations apply to the patched library too. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: lib/compiler/implementation/elements/elements.dart
diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
index e2dcc2add44cf35966a395936cf764fb7a9585b6..2b122f38df3561136904a2b4d793770cb3771cc0 100644
--- a/lib/compiler/implementation/elements/elements.dart
+++ b/lib/compiler/implementation/elements/elements.dart
@@ -386,11 +386,18 @@ class LibraryElement extends CompilationUnitElement {
class PrefixElement extends Element {
Map<SourceString, Element> imported;
Token firstPosition;
+ final CompilationUnitElement patchSource;
- PrefixElement(SourceString prefix, Element enclosing, this.firstPosition)
+ PrefixElement(SourceString prefix, Element enclosing, this.firstPosition,
+ [this.patchSource])
: imported = new Map<SourceString, Element>(),
super(prefix, ElementKind.PREFIX, enclosing);
+ CompilationUnitElement getCompilationUnit() {
+ if (patchSoure !== null) return patchSource;
+ return super.getCompilationUnit();
+ }
+
lookupLocalMember(SourceString memberName) => imported[memberName];
Type computeType(Compiler compiler) => compiler.types.dynamicType;

Powered by Google App Engine
This is Rietveld 408576698