Skip to content

Commit

Permalink
MethodUsedByAnalyzer: Hide for unresolved methods
Browse files Browse the repository at this point in the history
  • Loading branch information
James May committed Apr 27, 2022
1 parent 4a1f79a commit f8353d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ILSpy/Analyzers/Builtin/MethodUsedByAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MethodUsedByAnalyzer : IAnalyzer
{
const GetMemberOptions Options = GetMemberOptions.IgnoreInheritedMembers | GetMemberOptions.ReturnMemberDefinitions;

public bool Show(ISymbol symbol) => symbol is IMethod method && !method.IsVirtual;
public bool Show(ISymbol symbol) => symbol is IMethod method && !method.IsVirtual && method.ParentModule is not null;

public IEnumerable<ISymbol> Analyze(ISymbol analyzedSymbol, AnalyzerContext context)
{
Expand Down

0 comments on commit f8353d3

Please sign in to comment.