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

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

Issue 1512833007: A class that's only used as a field type should be considered used (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/resolver_test.dart
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index ecbbb2b99e5724618e4e4fff23a9c702bf92afa7..7d199e0d85a7495862a7b8703ce8c1ad236d8a3c 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -3762,6 +3762,22 @@ main() {
verify([source]);
}
+ void test_unusedElement_class_isUsed_fieldDeclaration() {
+ enableUnusedElement = true;
+ var src = r'''
+class Foo {
+ _Bar x;
+}
+
+class _Bar {
+}
+''';
+ Source source = addSource(src);
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_unusedElement_class_notUsed_variableDeclaration() {
enableUnusedElement = true;
Source source = addSource(r'''
« 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