mirror of https://github.com/astral-sh/ruff
This fixes an issue where renaming an overloaded function only renamed a single definition instead of all overloads and the implementation. The fix addresses two issues: 1. `navigation_targets_match` in references.rs now checks if any current target matches any of the target definitions (not just the first). This is important for overloaded functions where each overload is a separate definition but they all refer to the same logical symbol. 2. `get_definition_targets` for FunctionDef in goto.rs now uses a new `definitions_for_name_in_scope` function that returns all definitions with the same name in the same scope, not just the single function's definition. The new `definitions_for_name_in_scope` function in ide_support.rs takes a file and scope directly, bypassing the scope lookup from a node, which allows proper handling of function name identifiers. This also fixes property getter/setter/deleter renaming and submodule import reference finding, which now correctly identify all related definitions. |
||
|---|---|---|
| .. | ||
| resources | ||
| src | ||
| tests | ||
| Cargo.toml | ||
| build.rs | ||
| mdtest.py | ||
| mdtest.py.lock | ||