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

Unified Diff: pkg/analyzer/test/generated/non_hint_code_test.dart

Issue 1882633002: Clean up reporting HintCode.UNUSED_SHOWN_NAME when a prefixed top-level function is invoked. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Added new test. Created 4 years, 8 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/generated/resolver.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/generated/non_hint_code_test.dart
diff --git a/pkg/analyzer/test/generated/non_hint_code_test.dart b/pkg/analyzer/test/generated/non_hint_code_test.dart
index 8d9c19d532da22e4d3427d572037c012dc23c836..9fc1dfb311802623f4f9e70422f44aa7148fb980 100644
--- a/pkg/analyzer/test/generated/non_hint_code_test.dart
+++ b/pkg/analyzer/test/generated/non_hint_code_test.dart
@@ -1096,6 +1096,30 @@ topLevelFunction() {}''');
verify([source]);
}
+ void test_unusedImport_prefix_topLevelFunction2() {
+ Source source = addSource(r'''
+library L;
+import 'lib1.dart' hide topLevelFunction;
+import 'lib1.dart' as one show topLevelFunction;
+import 'lib1.dart' as two show topLevelFunction;
+class A {
+ static void x() {
+ One o;
+ one.topLevelFunction();
+ two.topLevelFunction();
+ }
+}''');
+ addNamedSource(
+ "/lib1.dart",
+ r'''
+library lib1;
+class One {}
+topLevelFunction() {}''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_useOfVoidResult_implicitReturnValue() {
Source source = addSource(r'''
f() {}
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698