@@ -191,13 +191,7 @@ private predicate moduleFlowsToMethodCallReceiver(RelevantCall call, Module m, s
191
191
flowsToMethodCallReceiver ( call , trackModuleAccess ( m ) , method )
192
192
}
193
193
194
- private Block yieldCall ( RelevantCall call ) {
195
- call .getExpr ( ) instanceof YieldCall and
196
- exists ( BlockParameterNode node |
197
- node = trackBlock ( result ) and
198
- node .getMethod ( ) = call .getExpr ( ) .getEnclosingMethod ( )
199
- )
200
- }
194
+ private Block blockCall ( RelevantCall call ) { lambdaSourceCall ( call , _, trackBlock ( result ) ) }
201
195
202
196
pragma [ nomagic]
203
197
private predicate superCall ( RelevantCall call , Module cls , string method ) {
@@ -297,7 +291,7 @@ predicate isUserDefinedNew(SingletonMethod new) {
297
291
298
292
private Callable viableSourceCallableNonInit ( RelevantCall call ) {
299
293
result = getTarget ( call ) and
300
- not call . getExpr ( ) instanceof YieldCall // handled by `lambdaCreation`/`lambdaCall`
294
+ not result = blockCall ( call ) // handled by `lambdaCreation`/`lambdaCall`
301
295
}
302
296
303
297
private Callable viableSourceCallableInit ( RelevantCall call ) { result = getInitializeTarget ( call ) }
@@ -394,7 +388,7 @@ private module Cached {
394
388
result = lookupMethod ( cls .getAnImmediateAncestor ( ) , method )
395
389
)
396
390
or
397
- result = yieldCall ( call )
391
+ result = blockCall ( call )
398
392
}
399
393
400
394
/** Gets a viable run-time target for the call `call`. */
@@ -700,13 +694,19 @@ private DataFlow::LocalSourceNode trackBlock(Block block, TypeTracker t) {
700
694
t .start ( ) and result .asExpr ( ) .getExpr ( ) = block
701
695
or
702
696
exists ( TypeTracker t2 , StepSummary summary |
703
- result = trackBlockRec ( block , t2 , summary ) and t = t2 .append ( summary )
697
+ result = trackBlockRec ( block , t2 , summary ) and
698
+ t = t2 .append ( summary )
704
699
)
705
700
}
706
701
702
+ /**
703
+ * We exclude steps into `self` parameters, which may happen when the code
704
+ * base contains implementations of `call`.
705
+ */
707
706
pragma [ nomagic]
708
707
private DataFlow:: LocalSourceNode trackBlockRec ( Block block , TypeTracker t , StepSummary summary ) {
709
- StepSummary:: step ( trackBlock ( block , t ) , result , summary )
708
+ StepSummary:: step ( trackBlock ( block , t ) , result , summary ) and
709
+ not result instanceof SelfParameterNode
710
710
}
711
711
712
712
pragma [ nomagic]
0 commit comments