Skip to content

'Convert typeof to nameof' is not offered on types nested in generic types #47129

@jnm2

Description

@jnm2

Version Used: 16.8-p2

using System.Collections.Generic;

Console.WriteLine([||]typeof(List<int>.Enumerator).Name); // Enumerator

Actual: no fix offered.

Expected:

Console.WriteLine(nameof(List<int>.Enumerator)); // Enumerator

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions