We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2acd3aa commit 872a5c6Copy full SHA for 872a5c6
src/PowerShellEditorServices/Symbols/PesterDocumentSymbolProvider.cs
@@ -43,9 +43,10 @@ IEnumerable<SymbolReference> IDocumentSymbolProvider.ProvideDocumentSymbols(
43
/// <returns>true if the Ast represents a PowerShell command with arguments, false otherwise</returns>
44
private static bool IsNamedCommandWithArguments(Ast ast)
45
{
46
+ CommandAst commandAst = ast as CommandAst;
47
48
return
- ast is CommandAst commandAst &&
49
+ commandAst != null &&
50
commandAst.InvocationOperator != TokenKind.Dot &&
51
PesterSymbolReference.GetCommandType(commandAst.GetCommandName()).HasValue &&
52
commandAst.CommandElements.Count >= 2;
0 commit comments