Skip to content

Nullability annotations in System.Linq.Expressions #43566

@olmobrutall

Description

@olmobrutall

I'm porting the LINQ provider of Signum Framework to .Net 5, In general I'm quite happy with the not nullable annotations, but I found two rough corners:

public MethodCallExpression Update(Expression @object, IEnumerable<Expression>? arguments)

        public MethodCallExpression Update(Expression @object, IEnumerable<Expression>? arguments)
        public MethodCallExpression Update(Expression? @object, IEnumerable<Expression>? arguments) //Inconsistent: The member is optional, but the Update method is not. 

   public ConstructorInfo? Constructor { get; }
   public ConstructorInfo Constructor { get; } //I think the constructor is mandatory, otherwise the Type property will throw exception.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions