Commit a9b762b
committed
Fix renaming of synthetic positions in IDE
While working on the IDE tests, I noticed that the Dotty IDE didn't
behave as I expected in the following scenario:
// Rename `Foo` to `Bar`
class Foo { new Foo }
The Dotty IDE would consider that 3 places need changing, instead of
only 2:
- The `Ident(Foo)` in the `TypeDef`
- The `Ident(Foo)` in the constructor
- The `Ident(Foo)` in `Select(new Foo, <init>)`
The third tree, however is synthetic: it doesn't need to be changed in
the editor.
Trees whose positions are not derived from the source are now excluded
when doing a rename.1 parent bfe5387 commit a9b762b
File tree
1 file changed
+3
-2
lines changed- language-server/src/dotty/tools/languageserver
1 file changed
+3
-2
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
| |||
0 commit comments