Commit 4173fe8
Address review: keep interface-compatible signature; cover explicit false capability
- Revert GetRegistrationOptions parameter to the non-nullable RenameCapability
declared by IPrepareRenameHandler/IRenameHandler, and rely on the
null-conditional check (capability?.PrepareSupport == true) for the runtime
case where the framework passes a null capability. This matches the OmniSharp
interface signature exactly, avoiding any nullable-annotation mismatch
(e.g. CS8765) while remaining null-safe during initialize.
- Add explicit { false, false } theory cases for both handler kinds so the
three distinct PrepareSupport inputs (omitted/null, true, false) are all
covered and a regression that treats false as enabled would be caught.
Verified: src and test projects build with 0 warnings under #nullable enable;
all 6 GetRegistrationOptionsReflectsPrepareSupport cases pass on net462 and net8.0.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 972a828 commit 4173fe8
2 files changed
Lines changed: 8 additions & 5 deletions
File tree
- src/PowerShellEditorServices/Services/TextDocument/Handlers
- test/PowerShellEditorServices.Test/Refactoring
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
| 145 | + | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
| |||
0 commit comments