Skip to content

Commit 17dcb46

Browse files
authored
prefer_final_in_for_each_test for final records (#4294)
1 parent f38c72e commit 17dcb46

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/rules/prefer_final_in_for_each_test.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ f() {
6565
]);
6666
}
6767

68+
test_record_final_ok() async {
69+
await assertNoDiagnostics(r'''
70+
f() {
71+
for (final (i, j) in [(1, 2)]) { }
72+
}
73+
''');
74+
}
75+
6876
test_record_mutated_ok() async {
6977
await assertNoDiagnostics(r'''
7078
f() {

0 commit comments

Comments
 (0)