@@ -427,13 +427,10 @@ public async Task<SymbolReference> GetDefinitionOfSymbolAsync(
427
427
SymbolReference foundDefinition = null ;
428
428
foreach ( ScriptFile scriptFile in referencedFiles )
429
429
{
430
- foundDefinition =
431
- AstOperations . FindDefinitionOfSymbol (
432
- scriptFile . ScriptAst ,
433
- foundSymbol ) ;
430
+ foundDefinition = AstOperations . FindDefinitionOfSymbol ( scriptFile . ScriptAst , foundSymbol ) ;
434
431
435
432
filesSearched . Add ( scriptFile . FilePath ) ;
436
- if ( foundDefinition != null )
433
+ if ( foundDefinition is not null )
437
434
{
438
435
foundDefinition . FilePath = scriptFile . FilePath ;
439
436
break ;
@@ -453,7 +450,7 @@ public async Task<SymbolReference> GetDefinitionOfSymbolAsync(
453
450
454
451
// if the definition the not found in referenced files
455
452
// look for it in all the files in the workspace
456
- if ( foundDefinition == null )
453
+ if ( foundDefinition is null )
457
454
{
458
455
// Get a list of all powershell files in the workspace path
459
456
foreach ( string file in _workspaceService . EnumeratePSFiles ( ) )
@@ -469,7 +466,7 @@ public async Task<SymbolReference> GetDefinitionOfSymbolAsync(
469
466
foundSymbol ) ;
470
467
471
468
filesSearched . Add ( file ) ;
472
- if ( foundDefinition != null )
469
+ if ( foundDefinition is not null )
473
470
{
474
471
foundDefinition . FilePath = file ;
475
472
break ;
@@ -480,7 +477,7 @@ public async Task<SymbolReference> GetDefinitionOfSymbolAsync(
480
477
// if the definition is not found in a file in the workspace
481
478
// look for it in the builtin commands but only if the symbol
482
479
// we are looking at is possibly a Function.
483
- if ( foundDefinition == null
480
+ if ( foundDefinition is null
484
481
&& ( foundSymbol . SymbolType == SymbolType . Function
485
482
|| foundSymbol . SymbolType == SymbolType . Unknown ) )
486
483
{
0 commit comments