Skip to content

Fixes minor bug in SemanticModel::lookup_symbol#14643

Merged
charliermarsh merged 1 commit intoastral-sh:mainfrom
Daverball:bugfix/lookup_symbol
Nov 27, 2024
Merged

Fixes minor bug in SemanticModel::lookup_symbol#14643
charliermarsh merged 1 commit intoastral-sh:mainfrom
Daverball:bugfix/lookup_symbol

Conversation

@Daverball
Copy link
Contributor

Summary

This came up as part of #12927 when implementing SemanticModel::simulate_runtime_load.

Should be fairly self-explanatory, if the scope returns a binding with BindingKind::Annotation the bottom part of the loop gets skipped, so there's no chance for seen_function to have been updated. So unless there's something subtle going on here, like function scopes never containing bindings with BindingKind::Annotation, this seems like a bug.

Test Plan

cargo nextest run

@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh merged commit 6d61c8a into astral-sh:main Nov 27, 2024
@charliermarsh
Copy link
Member

Thanks for following up! I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants