PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

Refactor rename incorrect when the referenced method is defined in another project.

Open ttSpace opened this issue 1 year ago • 0 comments

Describe the bug

image

Steps to Reproduce

  1. Create python application named PythonAppication1
  2. Create python application named PythonAppication2
  3. Right-click in PythonAppication1 and select Add->reference..., select PythonApplication2 as referenced
  4. Typing code in PythonApplication2.py
def add(a, b):
    print(a + b)
  1. Typing code in PythonAppication1.py
import PythonApplication2
PythonApplication2.add(1,2)
  1. Open PythonApplication2.py and select function name add and right-click to select rename...
  2. Input a new name addTest in rename dialog and press enter

Expected behavior

The name add can be renamed as addTest both in PythonApplication2.py and PythonApplication1.py

Actual behavior

Only renamed in PythonApplication2.py. the name of the place where this method is called has not changed.

image

ttSpace avatar Jan 16 '24 06:01 ttSpace