Skip to content

Definition Use chains have some confusing implementation when looking backwards at the RHS of an assignment. #3552

Description

@LonelyCat124

In #3492 It has become apparent that some of the code in the Definition Use Chains is not understood (particularly since the changes to handle multiple inputs), and the comments don't really explain what is happening (see #3492 (comment)). It would be good to look at improving either the code or comments that explain this, and also the corresponding section for UnsupportedTypes.

Removing this code entirely is not an option, as many of the tests (mostly involving loops) start finding the wrong dependencies at that point, but the way it behaves means (in particular) the order of results for loops is confusing (to me).

This is all a fun side effect of the tree order meaning searching backwards doesn't automatically find the RHS of an assignment when looking backwards from the LHS, so there are likely a few separate parts of the code that handle the RHS, and the code in question may just avoid duplication of adding the RHS to the code. If so this is not a problem, but it needs to be explained properly in the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions