Skip to content

Nullability in generated code does not match #51

Description

@denys-volodarskyi
public partial class TheClass : ReactiveUI.ReactiveObject
{
    public Func<string?, string?>? Validation { get; }
}

generates

public static IObservable<global::System.Func<string, string>?> WhenAnyValidation(this global::TheClass source)
{
    if (source is null) throw new ArgumentNullException(nameof(source));

    return new PropertyObserver<global::TheClass, global::System.Func<string, string>?>(
        source,
        "Validation",
        () => source.Validation);
}

output

Warning CS8619 : Nullability of reference types in value of type 'Func<string?, string?>' doesn't match target type 'Func<string, string>'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions