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

Incorrect minification of return [...iter].length in babili 0.1.4 #609

Closed
AshleyScirra opened this issue Jun 30, 2017 · 1 comment
Closed
Labels
bug Confirmed bug has PR Has an open PR that fixes this issue

Comments

@AshleyScirra
Copy link

Minifying this in babili 0.1.4:

function foo()
{
	return [...iter].length;
}

incorrectly outputs this:

function foo() {
	return 1;
}

Babili can't tell at compile-time how many elements the iterator will return, so it's incorrect to assume it's always 1.

@boopathi boopathi added the bug Confirmed bug label Jun 30, 2017
@boopathi
Copy link
Member

/cc @j-f1

@boopathi boopathi added the has PR Has an open PR that fixes this issue label Jun 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug has PR Has an open PR that fixes this issue
Projects
None yet
Development

No branches or pull requests

2 participants