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

Unified Diff: pkg/front_end/test/incremental_kernel_generator_test.dart

Issue 2894183002: Local declarations take precedence over exports. (Closed)
Patch Set: Created 3 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: pkg/front_end/test/incremental_kernel_generator_test.dart
diff --git a/pkg/front_end/test/incremental_kernel_generator_test.dart b/pkg/front_end/test/incremental_kernel_generator_test.dart
index 8c963340b59a713fe31b40a89d979fef2fcb072b..5e636c070c480111534d145949ff0a7d2ce9c88e 100644
--- a/pkg/front_end/test/incremental_kernel_generator_test.dart
+++ b/pkg/front_end/test/incremental_kernel_generator_test.dart
@@ -208,6 +208,36 @@ static field core::int c;
}
}
+ test_compile_export_hideWithLocal() async {
+ writeFile('/test/.packages', 'test:lib/');
+ String aPath = '/test/lib/a.dart';
+ String bPath = '/test/lib/b.dart';
+ String cPath = '/test/lib/c.dart';
+ writeFile(aPath, 'class A {} class B {}');
+ writeFile(bPath, 'export "a.dart"; class B {}');
+ Uri cUri = writeFile(
+ cPath,
+ r'''
+import 'b.dart';
+A a;
+B b;
+''');
+
+ Program program = await getInitialState(cUri);
+ Library library = _getLibrary(program, cUri);
+ expect(
+ _getLibraryText(library),
+ r'''
+library;
+import self as self;
+import "./a.dart" as a;
+import "./b.dart" as b;
+
+static field a::A a;
+static field b::B b;
+''');
+ }
+
test_compile_typedef() async {
writeFile('/test/.packages', 'test:lib/');
String aPath = '/test/lib/a.dart';

Powered by Google App Engine
This is Rietveld 408576698