Skip to content

mangler: function not given a unique slot in sloppy mode #20610

Description

@camc314

Input:

function outer(input) {
    let data = input;
    Object.keys(data).forEach((key) => {
        let value = data[key];
        if (value) {
            function appendStyle() {}
            console.log(appendStyle);
        }
        console.log(value);
    });
}

Output:

function e(e) {
	let t = e;
	Object.keys(t).forEach((e) => {
		let n = t[e];
		if (n) {
			function e() {}
			console.log(e);
		}
		console.log(n);
	});
}

In the current, above output, function e conflicts with e as the callback of the for each call.

rolldown/rolldown#8791

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions