Skip to content

Commit 3f17014

Browse files
authored
Merge pull request github#2086 from calumgrant/cs/indexer-detection
C#: Fix an InvalidCastException
2 parents cae7f9d + d5a48a3 commit 3f17014

File tree

1 file changed

+1
-1
lines changed
  • csharp/extractor/Semmle.Extraction.CSharp/Entities

1 file changed

+1
-1
lines changed

csharp/extractor/Semmle.Extraction.CSharp/Entities/Property.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public override Microsoft.CodeAnalysis.Location FullLocation
111111

112112
public static Property Create(Context cx, IPropertySymbol prop)
113113
{
114-
bool isIndexer = prop.IsIndexer || prop.ExplicitInterfaceImplementations.Any(e => e.IsIndexer);
114+
bool isIndexer = prop.IsIndexer || prop.Parameters.Any();
115115

116116
return isIndexer ? Indexer.Create(cx, prop) : PropertyFactory.Instance.CreateEntity(cx, prop);
117117
}

0 commit comments

Comments
 (0)