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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2678273007: When a name is both exported and defined locally, the name is defined. (Closed)
Patch Set: Created 3 years, 10 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 | « pkg/analyzer/lib/src/summary/prelink.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/resynthesize_common.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 4f2cd4007f7d85e1ca3e57a43af1088b6ab19812..dbbc1f103e1e7771062cef66a5451ceac68e016d 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -4396,6 +4396,43 @@ class C {
checkLibrary('class C { void f<T, U>(T x(U u)) {} }');
}
+ test_nameConflict_exportedAndLocal() {
+ namesThatCannotBeResolved.add('V');
+ addLibrarySource('/a.dart', 'class C {}');
+ addLibrarySource(
+ '/c.dart',
+ '''
+export 'a.dart';
+class C {}
+''');
+ checkLibrary('''
+import 'c.dart';
+C v = null;
+''');
+ }
+
+ test_nameConflict_exportedAndParted() {
+ namesThatCannotBeResolved.add('V');
+ addLibrarySource('/a.dart', 'class C {}');
+ addLibrarySource(
+ '/b.dart',
+ '''
+part of lib;
+class C {}
+''');
+ addLibrarySource(
+ '/c.dart',
+ '''
+library lib;
+export 'a.dart';
+part 'b.dart';
+''');
+ checkLibrary('''
+import 'c.dart';
+C v = null;
+''');
+ }
+
test_nested_generic_functions_in_generic_class_with_function_typed_params() {
checkLibrary('''
class C<T, U> {
« no previous file with comments | « pkg/analyzer/lib/src/summary/prelink.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698