Repository navigation
Commit 69cd2fe
Withhold function extraction that would mutate a copy of a mutable struct
A by-value parameter of a struct type is a copy, so s.Inc() on it left the
caller's mutable s unchanged. When a mutable struct local that would become
a parameter is the receiver of a member call, a field or indexer access or
an address-of in the selection, no function extraction is offered.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 17f695a commit 69cd2fe
2 files changed
Lines changed: 38 additions & 0 deletions
File tree
- vsintegration
- src/FSharp.Editor/Refactor
- tests/FSharp.Editor.Tests/Refactors
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
206 | 228 | | |
207 | 229 | | |
208 | 230 | | |
| |||
416 | 438 | | |
417 | 439 | | |
418 | 440 | | |
| 441 | + | |
419 | 442 | | |
420 | 443 | | |
421 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
339 | 354 | | |
340 | 355 | | |
341 | 356 | | |
| |||
0 commit comments