@@ -260,7 +260,8 @@ private module Cached {
260260 or
261261 FlowSummaryImplSpecific:: ParsePositions:: isParsedKeywordParameterPosition ( _, name )
262262 } or
263- TAnyArgumentPosition ( )
263+ TAnyArgumentPosition ( ) or
264+ TAnyKeywordArgumentPosition ( )
264265
265266 cached
266267 newtype TParameterPosition =
@@ -279,7 +280,8 @@ private module Cached {
279280 or
280281 FlowSummaryImplSpecific:: ParsePositions:: isParsedKeywordArgumentPosition ( _, name )
281282 } or
282- TAnyParameterPosition ( )
283+ TAnyParameterPosition ( ) or
284+ TAnyKeywordParameterPosition ( )
283285}
284286
285287import Cached
@@ -483,6 +485,9 @@ class ParameterPosition extends TParameterPosition {
483485 */
484486 predicate isAny ( ) { this = TAnyParameterPosition ( ) }
485487
488+ /** Holds if this position represents any positional parameter. */
489+ predicate isAnyNamed ( ) { this = TAnyKeywordParameterPosition ( ) }
490+
486491 /** Gets a textual representation of this position. */
487492 string toString ( ) {
488493 this .isSelf ( ) and result = "self"
@@ -496,6 +501,8 @@ class ParameterPosition extends TParameterPosition {
496501 exists ( string name | this .isKeyword ( name ) and result = "keyword " + name )
497502 or
498503 this .isAny ( ) and result = "any"
504+ or
505+ this .isAnyNamed ( ) and result = "any-named"
499506 }
500507}
501508
@@ -519,6 +526,9 @@ class ArgumentPosition extends TArgumentPosition {
519526 */
520527 predicate isAny ( ) { this = TAnyArgumentPosition ( ) }
521528
529+ /** Holds if this position represents any positional parameter. */
530+ predicate isAnyNamed ( ) { this = TAnyKeywordArgumentPosition ( ) }
531+
522532 /** Gets a textual representation of this position. */
523533 string toString ( ) {
524534 this .isSelf ( ) and result = "self"
@@ -530,6 +540,8 @@ class ArgumentPosition extends TArgumentPosition {
530540 exists ( string name | this .isKeyword ( name ) and result = "keyword " + name )
531541 or
532542 this .isAny ( ) and result = "any"
543+ or
544+ this .isAnyNamed ( ) and result = "any-named"
533545 }
534546}
535547
@@ -551,4 +563,8 @@ predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) {
551563 ppos .isAny ( ) and not apos .isSelf ( )
552564 or
553565 apos .isAny ( ) and not ppos .isSelf ( )
566+ or
567+ ppos .isAnyNamed ( ) and apos .isKeyword ( _)
568+ or
569+ apos .isAnyNamed ( ) and ppos .isKeyword ( _)
554570}
0 commit comments