Skip to content

Missing nullability warning on tuple conversion for receiver of extension member #81851

@jcouv

Description

@jcouv

We have this warning for classic extension methods, but are missing it for extension block members.

#nullable enable

(object, object)? o = (new object(), new object());
_ = o.P; // missing warning
o.P = 42; // missing warning
o.M(); // missing warning
o.M2(); // warning

static class E
{
    extension((object?, object?)? o)
    {
        public int P { get => throw null!; set => throw null!; }
        public void M() { }
    }
    public static void M2(this (object?, object?)? o) { }
}

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions