-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# 8.0 nullable reference types #1425
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ue to NullabilityAnnotatedType decorator.
…eferenced assemblies. This can happen if an application is compiled for .NET 4.6.2 and references System.ValueTuple.dll; but ILSpy loads the latest mscorlib (e.g. .NET 4.7) which also contains struct System.ValueTuple.
This fixes compiling CustomAttributeConflicts.cs with legacy csc.
The changes to our test runner infrastructure and some cosmetic changes to the test cases caused some minor differences here.
Remove the committed .il files: these were originally intended to prevent test failures due to differences in the C# compiler on the system. But legacy csc stopped changing long ago; and roslyn is tested via NuGet package, so everyone is using the same version. Interestingly enough, avoiding the roundtrip through ildasm/ilasm caused some test failures due to changes in the order of top-level types. So I've started sorting the types by name to ensure consistency in the tests. This required adjusting some existing tests.
…ewer Roslyn code-gen correctly.
…s indistinguishable from if (bool).
ElektroKill
added a commit
to dnSpyEx/ILSpy
that referenced
this pull request
Jul 15, 2021
…ce-types C# 8.0 nullable reference types
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is an initial implementation that adds the
?
in signatures involving nullable reference types.Note that there's many situations where the nullability is not explicitly stored in the assembly, but would have to be inferred in order to avoid compiler warnings. We don't attempt to do this yet; all non-signature types will use non-nullable reference types.