Skip to content

SetUnknownNullabilityForReferenceTypes issues #28487

@jcouv

Description

@jcouv

Doesn't fix all type arguments
In a C# 7 compilation, class C<T, U> : A<T>.B<U> results in a base type A<T!>.B<U>.
A test that hits that is ErrorTypeSymbolTests.ConstructedErrorTypes.

Also, UsesIsNullableVisitor probably should have caught that.

Incorrectly replaces nullable types with oblivious
There is another issue in SetUnknownNullabilityForReferenceTypes. It replaces string? with string~, but is should leave it alone (see UnannotatedConstraint_Override).

Produces different type symbols
Finally, it changes the specific representation of error types (produces a SubstitutedNestedErrorTypeSymbol instead of leaving an ExtendedErrorTypeSymbol), in that same test (ErrorTypeSymbolTests.ConstructedErrorTypes).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions