Commit 2d5befb
Use document.Project.Solution directly instead of Workspace.CurrentSolution (issue #19560)
Previous code used document.Project.Solution.Workspace.CurrentSolution
to look up the .fsi document at apply time. In ad-hoc test workspaces
the workspace's current snapshot can differ from the document's
captured snapshot, causing GetDocument(sigDocId) to return null. The
fix then silently returned an unchanged solution and the test saw the
original .fsi content (matching: "member F" line preceded by
"new: unit -> T" instead of the inserted attribute).
Use document.Project.Solution directly. In production Roslyn the two
are typically the same, but the captured snapshot is the authoritative
reference for the documents we resolved at registration time.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 77e8ee7 commit 2d5befb
1 file changed
Lines changed: 8 additions & 10 deletions
Lines changed: 8 additions & 10 deletions
| 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 | 206 | | |
216 | 207 | | |
217 | 208 | | |
| |||
259 | 250 | | |
260 | 251 | | |
261 | 252 | | |
262 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
263 | 261 | | |
264 | 262 | | |
265 | 263 | | |
| |||
0 commit comments