Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't lose the frozen source generated document state
In this particular code path, we were passing null for the frozen source generated document state when we could have passed it along. The original logic here was frozen source generated documents only normally appear when somebody calls ITextSnapshot.GetOpenDocumentInCurrentContextWithChanges, since we need to ensure that there is a generated document with that exact snapshot for the feature to work. We should never see that in a "primary" solution in any way. However, solution sync uses CurrentSolution as a cache for the previously synced complete solution, which meant we'd still end up calling this anyways. Although we could (and probably should) avoid caching these special solutions entirely, this avoids any surprises here and makes things behave like normal, and avoids odd cases where the CompilationTrackers are out of sync with this field. This partially addresses dotnet#57082
- Loading branch information