Skip to content

Reporting "field is uninitialized" for constructor that throws an exception #25529

@cston

Description

@cston

Reports: (5,14): warning CS8618: Non-nullable field '_f' is uninitialized.

using System;
class C
{
    private object _f;
    internal C()
    {
        throw new NotImplementedException();
    }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions