Skip to content

Commit

Permalink
! No longer marked C# enum fields and const fields as static
Browse files Browse the repository at this point in the history
  • Loading branch information
wmjordan committed Jan 21, 2022
1 parent 4f376a4 commit ec51614
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Codist/Taggers/CSharpTagger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -805,12 +805,16 @@ static IEnumerable<ClassificationTag> GetClassificationType(SyntaxNode node, Sem

case SymbolKind.Field:
var f = symbol as IFieldSymbol;
yield return f.IsConst ?
f.ContainingType.TypeKind == TypeKind.Enum ? _Classifications.EnumField
: _Classifications.ConstField
: f.IsReadOnly ? _Classifications.ReadonlyField
: f.IsVolatile ? _Classifications.VolatileField
: _Classifications.Field;
if (f.IsConst) {
yield return f.ContainingType.TypeKind == TypeKind.Enum ? _Classifications.EnumField
: _Classifications.ConstField;
yield break;
}
else {
yield return f.IsReadOnly ? _Classifications.ReadonlyField
: f.IsVolatile ? _Classifications.VolatileField
: _Classifications.Field;
}
break;

case SymbolKind.Property:
Expand Down

0 comments on commit ec51614

Please sign in to comment.