@@ -885,19 +885,25 @@ private module ParameterNodes {
885
885
* A node that holds the content of a specific positional argument.
886
886
* See `SynthSplatArgumentNode` for more information.
887
887
*/
888
- class SynthSplatParameterElementNode extends TSynthSplatParameterElementNode {
888
+ class SynthSplatParameterElementNode extends ParameterNodeImpl , TSynthSplatParameterElementNode {
889
889
private DataFlowCallable callable ;
890
890
private int pos ;
891
891
892
892
SynthSplatParameterElementNode ( ) { this = TSynthSplatParameterElementNode ( callable , pos ) }
893
893
894
894
int getPosition ( ) { result = pos }
895
895
896
- DataFlowCallable getCallable ( ) { result = callable }
896
+ final override Parameter getParameter ( ) { none ( ) }
897
+
898
+ final override predicate isParameterOf ( DataFlowCallable c , ParameterPosition p ) { none ( ) }
899
+
900
+ final override CfgScope getCfgScope ( ) { result = callable .asCallable ( ) }
897
901
898
- string toString ( ) { result = "synthetic *args[" + pos + "]" }
902
+ final override DataFlowCallable getEnclosingCallable ( ) { result = callable }
903
+
904
+ final override Location getLocationImpl ( ) { result = callable .getLocation ( ) }
899
905
900
- Location getLocation ( ) { result = callable . getLocation ( ) }
906
+ final override string toStringImpl ( ) { result = "synthetic *args[" + pos + "]" }
901
907
}
902
908
903
909
/** A parameter for a library callable with a flow summary. */
@@ -1344,7 +1350,9 @@ predicate storeStepCommon(Node node1, ContentSet c, Node node2) {
1344
1350
exists ( SynthSplatParameterElementNode elemNode , NormalParameterNode splatNode , int splatPos |
1345
1351
elemNode = node1 and splatNode = node2
1346
1352
|
1347
- splatNode .isParameterOf ( elemNode .getCallable ( ) , any ( ParameterPosition p | p .isSplat ( splatPos ) ) ) and
1353
+ splatNode
1354
+ .isParameterOf ( elemNode .getEnclosingCallable ( ) ,
1355
+ any ( ParameterPosition p | p .isSplat ( splatPos ) ) ) and
1348
1356
c = getPositionalContent ( elemNode .getPosition ( ) - splatPos )
1349
1357
)
1350
1358
}
@@ -1421,7 +1429,7 @@ predicate readStep(Node node1, ContentSet c, Node node2) {
1421
1429
exists ( SynthSplatArgParameterNode fromNode , SynthSplatParameterElementNode toNode , int pos |
1422
1430
node1 = fromNode and node2 = toNode
1423
1431
|
1424
- fromNode .isParameterOf ( toNode .getCallable ( ) , _) and
1432
+ fromNode .isParameterOf ( toNode .getEnclosingCallable ( ) , _) and
1425
1433
c = getPositionalContent ( pos ) and
1426
1434
toNode .getPosition ( ) = pos
1427
1435
)
0 commit comments