33// Licensed under the MIT license. See LICENSE file in the project root for full license information.
44//
55
6+ using System ;
67using System . Collections . Generic ;
78using System . Management . Automation . Language ;
89
@@ -34,7 +35,7 @@ public override AstVisitAction VisitCommand(CommandAst commandAst)
3435 {
3536 Ast commandNameAst = commandAst . CommandElements [ 0 ] ;
3637 if ( symbolRef . SymbolType . Equals ( SymbolType . Function ) &&
37- commandNameAst . Extent . Text . Equals ( symbolRef . ScriptRegion . Text ) )
38+ commandNameAst . Extent . Text . Equals ( symbolRef . ScriptRegion . Text , StringComparison . InvariantCultureIgnoreCase ) )
3839 {
3940 this . FoundReferences . Add ( new SymbolReference (
4041 SymbolType . Function ,
@@ -65,7 +66,7 @@ public override AstVisitAction VisitFunctionDefinition(FunctionDefinitionAst fun
6566 } ;
6667
6768 if ( symbolRef . SymbolType . Equals ( SymbolType . Function ) &&
68- nameExtent . Text . Equals ( symbolRef . SymbolName ) )
69+ nameExtent . Text . Equals ( symbolRef . SymbolName , StringComparison . InvariantCultureIgnoreCase ) )
6970 {
7071 this . FoundReferences . Add ( new SymbolReference (
7172 SymbolType . Function ,
@@ -83,7 +84,7 @@ public override AstVisitAction VisitFunctionDefinition(FunctionDefinitionAst fun
8384 public override AstVisitAction VisitCommandParameter ( CommandParameterAst commandParameterAst )
8485 {
8586 if ( symbolRef . SymbolType . Equals ( SymbolType . Parameter ) &&
86- commandParameterAst . Extent . Text . Equals ( symbolRef . SymbolName ) )
87+ commandParameterAst . Extent . Text . Equals ( symbolRef . SymbolName , StringComparison . InvariantCultureIgnoreCase ) )
8788 {
8889 this . FoundReferences . Add ( new SymbolReference (
8990 SymbolType . Parameter ,
@@ -101,7 +102,7 @@ public override AstVisitAction VisitCommandParameter(CommandParameterAst command
101102 public override AstVisitAction VisitVariableExpression ( VariableExpressionAst variableExpressionAst )
102103 {
103104 if ( symbolRef . SymbolType . Equals ( SymbolType . Variable ) &&
104- variableExpressionAst . Extent . Text . Equals ( symbolRef . SymbolName ) )
105+ variableExpressionAst . Extent . Text . Equals ( symbolRef . SymbolName , StringComparison . InvariantCultureIgnoreCase ) )
105106 {
106107 this . FoundReferences . Add ( new SymbolReference (
107108 SymbolType . Variable ,
0 commit comments