C#: Compare symbols using SymbolEqualityComparer.

This commit is contained in:
Calum Grant
2019-11-22 12:51:19 +00:00
parent ca195e9340
commit 5f6527a183
13 changed files with 29 additions and 24 deletions

View File

@@ -46,7 +46,9 @@ namespace Semmle.Extraction
public bool InFileScope(string path) => path == filepath;
public bool InScope(ISymbol symbol) => Equals(symbol.ContainingAssembly, assembly) || Equals(symbol, assembly);
public bool InScope(ISymbol symbol) =>
SymbolEqualityComparer.Default.Equals(symbol.ContainingAssembly, assembly) ||
SymbolEqualityComparer.Default.Equals(symbol, assembly);
}
/// <summary>