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

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

Issue 10830303: Refactor Library/CompilationUnit and how we define local Scope. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix reference in dart2js_mirror.dart 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 6563d51feae7bac8b9f474c56d0976c5078f6ceb..a62e335aa9289081c69fc2b8aed55e3af72180fa 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -196,11 +196,10 @@ 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) {
- compiler.withCurrentElement(link.head, () {
- target.define(link.head, compiler);
- });
+ for (var element in imported.localMembers) {
ahe 2012/08/14 12:45:26 This is a test, so I don't mind using for-in.
+ compiler.withCurrentElement(element, () {
+ target.addToScope(element, compiler);
+ });
}
}

Powered by Google App Engine
This is Rietveld 408576698