Skip to content

getStaticValue doesn't track references types correctly #32

@RunDevelopment

Description

@RunDevelopment

Example: const a = []; a === a will evaluate to false.

This is because getStaticValue evaluates each reference to a variable separately, so we get different objects with the same value each time. However, they should be the same value.

Solution: Cache the value of each variable.

Non-solution: Change the === operator (among others) to not evaluate the equality of non-value types. This solution simply doesn't scale as built-in safe functions might use === under the hood.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions