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

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: Rebase and refactor ClassElement.constructors. 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
« no previous file with comments | « tests/compiler/dart2js/find_my_name_test.dart ('k') | tests/compiler/dart2js/parser_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2ebe46b0b7f253edbb3ccec7096562e6f2ceae41 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -190,11 +190,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) {
+ compiler.withCurrentElement(element, () {
+ target.addToScope(element, compiler);
+ });
}
}
« no previous file with comments | « tests/compiler/dart2js/find_my_name_test.dart ('k') | tests/compiler/dart2js/parser_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698