Skip to content

Commit 7c54c79

Browse files
committed
Add test case with nested functions
1 parent 130ca22 commit 7c54c79

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lint_test/use_descriptive_names_for_type_parameters_test/use_descriptive_names_for_type_parameters_test.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/// Check the `use_descriptive_names_for_type_parameters` rule
22
3+
// ignore_for_file: unused_element
4+
35
// expect_lint: use_descriptive_names_for_type_parameters
46
class SomeClass<T, U, K> {}
57

@@ -15,6 +17,17 @@ void functionWithTypes<T, U, K>(T t, U u, K k) {}
1517

1618
void validFunction<Type, Data, Context>(Type t, Data d, Context c) {}
1719

20+
void functionWithGenericFunctionDeclarations() {
21+
// expect_lint: use_descriptive_names_for_type_parameters
22+
void _fail3<A, B, C>() {}
23+
24+
void _pass2<D, E>() {}
25+
26+
void _pass1<F>() {}
27+
28+
void _pass0() {}
29+
}
30+
1831
void twoTypeParams<T, U>(T t, U u) {}
1932

2033
// expect_lint: use_descriptive_names_for_type_parameters

0 commit comments

Comments
 (0)