Skip to content
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 22 commits into from Mar 2, 2019


None yet
2 participants
Copy link

dgrunwald commented Feb 16, 2019

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.

dgrunwald and others added some commits Feb 16, 2019

Avoid exceptions on IType->ArrayType or IType->ITypeParameter casts d…
…ue to NullabilityAnnotatedType decorator.
Improve decompiler behavior is System.ValueTuple exists in multiple r…
…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.
Only reference Microsoft.VisualBasic.dll in VB-related tests.
This fixes compiling CustomAttributeConflicts.cs with legacy csc.
Re-generate the IL for test cases with Roslyn 2.10.0.
The changes to our test runner infrastructure and some cosmetic changes to the test cases caused some minor differences here.
Upgrade Roslyn for tests to 3.0.0-beta3.
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.

@siegfriedpammer siegfriedpammer merged commit 76e641f into master Mar 2, 2019

2 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
continuous-integration/appveyor/pr AppVeyor build succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.