Skip to content

RCS1176 should be reported only for variables where type can be inferred #1122

Description

@hankovich

Product and Version Used: 4.3.0

The following examples are false positives:

// 1
Span<char> charSpan = stackalloc char[size];

// 2
T result = default!;

// 3
var type = typeof(int);
Type? nullableType = type;

// 4
ProblemDetails details = new();

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions