This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Fix some nullable reference type errors in Visual Studio 16.8 #739
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It looks like there were some changes to nullable reference type analysis in Visual Studio 16.8, causing some errors when building the Q# compiler. (This is despite having a global.json that sets the SDK version to 3.1 -
dotnet buildwould succeed, but building in VS itself would fail.) The changes needed to fix the errors continue to work in 3.1, and mostly seem reasonable.There's one (small) breaking change. I removed the default parameter from the
TypedExpressionWalkerconstructor:This could be worked around with nullable attributes or the null-forgiving operator, but having a null transformation state does not seem like a great idea, anyway.