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

Unified Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 10832203: Refactor Library/CompilationUnit and how we define local Scope. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Last test fixes, passes co19. Created 8 years, 4 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: tests/compiler/dart2js/mock_compiler.dart
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index 8694ef6b7ec80141f3c4964de7b108c03bd480fc..e3a22e3d5cd244c66d2458ef36301c753282848f 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -190,10 +190,9 @@ void compareWarningKinds(String text, expectedWarnings, foundWarnings) {
void importLibrary(LibraryElement target, LibraryElement imported,
Compiler compiler) {
- for (Link<Element> link = imported.topLevelElements; !link.isEmpty();
- link = link.tail) {
+ for (var link in imported.localMembers) {
compiler.withCurrentElement(link.head, () {
- target.define(link.head, compiler);
+ target.addToScope(link.head, compiler);
});
}
}

Powered by Google App Engine
This is Rietveld 408576698