C#: Roslyn workaround for when IPropertySymbol.IsIndexer seems to be working incorrectly.

This commit is contained in:
Calum Grant
2019-10-04 16:28:28 +01:00
parent b55e2948be
commit ba6eb22cc9

View File

@@ -111,7 +111,7 @@ namespace Semmle.Extraction.CSharp.Entities
public static Property Create(Context cx, IPropertySymbol prop)
{
bool isIndexer = prop.IsIndexer || prop.ExplicitInterfaceImplementations.Any(e => e.IsIndexer);
bool isIndexer = prop.IsIndexer || prop.ExplicitInterfaceImplementations.Any(e => e.IsIndexer) || prop.Parameters.Any();
return isIndexer ? Indexer.Create(cx, prop) : PropertyFactory.Instance.CreateEntity(cx, prop);
}