C#: Fix lambda flow.

This commit is contained in:
Anders Schack-Mulligen
2025-12-05 10:58:01 +01:00
parent e4ee7c95c5
commit 28e9420476

View File

@@ -3050,8 +3050,11 @@ predicate additionalLambdaFlowStep(Node nodeFrom, Node nodeTo, boolean preserves
exists(AssignableDefinition def |
def.getTargetAccess() = fa and
nodeFrom.asExpr() = def.getSource() and
nodeTo = TFlowInsensitiveFieldNode(f) and
nodeTo = TFlowInsensitiveFieldNode(f)
|
nodeFrom.getEnclosingCallable() instanceof Constructor
or
nodeFrom.getEnclosingCallable() instanceof ObjectInitMethod
)
or
nodeFrom = TFlowInsensitiveFieldNode(f) and