File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
powershell/ql/lib/semmle/code/powershell/dataflow/internal Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -523,9 +523,21 @@ class NamedSet extends NamedSet0 {
523523 not exists ( result .getNamedArgument ( _) )
524524 }
525525
526+ pragma [ nomagic]
527+ private Function getAFunctionRec ( int i ) {
528+ i = 0 and
529+ result .getAParameter ( ) .getLowerCaseName ( ) = this .getRankedName ( 0 )
530+ or
531+ exists ( string name |
532+ pragma [ only_bind_into ] ( name ) = this .getRankedName ( i ) and
533+ result .getAParameter ( ) .getLowerCaseName ( ) = pragma [ only_bind_into ] ( name ) and
534+ result = this .getAFunctionRec ( i - 1 )
535+ )
536+ }
537+
526538 /** Gets a function that has a parameter for each name in this set. */
527539 Function getAFunction ( ) {
528- forex ( string name | name = this .getAName ( ) | result . getAParameter ( ) . matchesName ( name ) )
540+ result = this .getAFunctionRec ( this . getSize ( ) - 1 )
529541 or
530542 this .isEmpty ( ) and
531543 exists ( result )
You can’t perform that action at this time.
0 commit comments