Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

synonymsDict.hasOwnProperty(n)) section a bit mysterious #1004

Open
increpare opened this issue Apr 29, 2024 · 0 comments
Open

synonymsDict.hasOwnProperty(n)) section a bit mysterious #1004

increpare opened this issue Apr 29, 2024 · 0 comments

Comments

@increpare
Copy link
Owner

increpare commented Apr 29, 2024

What does this section do? How to trigger it?

delete synonymsDict[n];

    var modified = true;
    while (modified) {
        modified = false;
        for (var n in synonymsDict) {
            if (synonymsDict.hasOwnProperty(n)) {
                var value = synonymsDict[n];
                if (value in propertiesDict) {
                    delete synonymsDict[n];
                    propertiesDict[n] = propertiesDict[value];
                    modified = true;
                } else if (value in aggregatesDict) {
                    delete aggregatesDict[n];
                    aggregatesDict[n] = aggregatesDict[value];
                    modified = true;
                } else if (value in synonymsDict) {
                    synonymsDict[n] = synonymsDict[value];
                }
            }
        }

ditto for the aggregate section after (which is at least partially covered by the "Cannot define an aggregate in terms of properties" test)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant