Skip to content

Commit

Permalink
early continue
Browse files Browse the repository at this point in the history
  • Loading branch information
danbi2990 committed Oct 24, 2023
1 parent 85166ca commit 0e6f48a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ pub(crate) fn redefined_argument_from_local(checker: &mut Checker, stmt: &Stmt)
loop {
if let ScopeKind::Function(ast::StmtFunctionDef { parameters, .. }) = scope.kind {
for (name, range) in visitor.names() {
if parameters.includes(name) && !already_added.contains(&range) {
if already_added.contains(&range) {
continue;
}
if parameters.includes(name) {
dianostics.push(Diagnostic::new(
RedefinedArgumentFromLocal {
name: name.to_string(),
Expand Down

0 comments on commit 0e6f48a

Please sign in to comment.