Merge pull request #12513 from hvitved/dataflow/lambda-flow-no-expects-content

Data flow: Exclude `expectsContent` nodes from lambda flow
This commit is contained in:
Tom Hvitved
2023-03-14 15:28:35 +01:00
committed by GitHub
9 changed files with 9 additions and 0 deletions

View File

@@ -182,6 +182,7 @@ private module LambdaFlow {
boolean toJump, DataFlowCallOption lastCall
) {
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
not expectsContent(node, _) and
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
then compatibleTypes(t, getNodeDataFlowType(node))
else any()