Skip to content

Negated IIFE in if body produces superfluous ! #1288

@rvanvelzen

Description

@rvanvelzen

Test case (that currently fails):

regression_negate_iife_in_if: {
    options = {
        negate_iife: true,
        conditionals: true,
    }
    input: {
        if (!x) {
            (function () {
                x = {};
            })();
        }
    }
    expect: {
        x || function () {
            x = {};
        }();
    }
}

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