dotnet/roslyn

SourceFieldSymbol.HasRuntimeSpecialName should check that containing type is enum

Aberta

#23.058 aberto em 7 de nov. de 2017

 (0 comentário) (0 reação) (0 responsável)C# (4.257 forks)batch import
Area-CompilersBughelp wanted

Métricas do repositório

Stars
 (20.414 estrelas)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (256 fundiu PRs em 30d)

Description

It feels like we should at least check that the containing type is an enum.

        internal sealed override bool HasRuntimeSpecialName
        {
            get
            {
                return this.Name == WellKnownMemberNames.EnumBackingFieldName;
            }
        }

Relates to https://github.com/dotnet/roslyn/pull/22664#discussion_r149507555

Guia do colaborador