Files
openide/python/testData/refactoring/introduceVariable/invalidElementAccessAfterPostReformatOfUsageSite.py
Mikhail Golubev 3e4024127f PY-32827 EA-90746 Fix PIEAE when extracting variable needs post-reformatting
by using smart pointers to preserve references to original elements (occurrences and
inserted declaration) after PSI trees were merged to reflect the changes.

In such cases after tree merging the assignment containing the usage
gets deleted altogether (hence PIEAE on the occurrence) and in the assignment
with declaration both LHS and RHS are replaced so that it effectively becomes
that assignment with the usage.
2018-11-29 13:15:53 +03:00

3 lines
50 B
Python

foo = 1 + <selection>(1 + 1)</selection> + 1