dotnet/roslyn

SourceFieldSymbol.HasRuntimeSpecialName should check that containing type is enum

Open

#23,058 建立於 2017年11月7日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)C# (20,414 star) (4,257 fork)batch import
Area-CompilersBughelp wanted

描述

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

貢獻者指南