Skip to content

Commit

Permalink
Fix highlighting F#-defined CliEvents idents
Browse files Browse the repository at this point in the history
  • Loading branch information
auduchinok committed Dec 18, 2017
1 parent b942dc4 commit c38f2fb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static string GetEntityHighlightingAttributeId([NotNull] this FSharpEntit
[NotNull]
public static string GetMfvHighlightingAttributeId([NotNull] this FSharpMemberOrFunctionOrValue mfv)
{
if (mfv.IsEvent || mfv.IsEventAddMethod || mfv.IsEventRemoveMethod)
if (mfv.IsEvent || mfv.IsEventAddMethod || mfv.IsEventRemoveMethod || mfv.EventForFSharpProperty != null)
return HighlightingAttributeIds.EVENT_IDENTIFIER_ATTRIBUTE;

if (mfv.IsImplicitConstructor || mfv.IsConstructor)
Expand Down Expand Up @@ -59,7 +59,7 @@ public static string GetHighlightingAttributeId([NotNull] this FSharpSymbol symb
return GetEntityHighlightingAttributeId(entity);

case FSharpMemberOrFunctionOrValue mfv when !mfv.IsUnresolved:
return GetMfvHighlightingAttributeId(mfv);
return GetMfvHighlightingAttributeId(mfv.AccessorProperty?.Value ?? mfv);

case FSharpField field:
return field.IsLiteral
Expand Down

0 comments on commit c38f2fb

Please sign in to comment.