Skip to content

Commit

Permalink
[wildcards] don’t overreport parameter_assignments
Browse files Browse the repository at this point in the history
Fixes: dart-lang/linter#5041

Change-Id: I128933b8f5c720acbbc2ec57a90dc2992977bb05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378571
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
  • Loading branch information
pq authored and Commit Queue committed Aug 2, 2024
1 parent 4ec57e2 commit b39f386
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/linter/test/rules/parameter_assignments_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ void f({int? p}) {
]);
}

test_assignment_wildcard() async {
await assertDiagnostics(r'''
void f([int? _]) {
_ = 8;
}
''', [
// No lint.
error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 21, 1),
]);
}

@FailingTest(reason: 'Closures not implemented')
test_closure_assignment() async {
await assertDiagnostics(r'''
Expand Down

0 comments on commit b39f386

Please sign in to comment.