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

[...new Array(100).keys()] Inconsistent with babel result #6627

Closed
ckken opened this issue Dec 12, 2022 · 5 comments
Closed

[...new Array(100).keys()] Inconsistent with babel result #6627

ckken opened this issue Dec 12, 2022 · 5 comments
Labels
Milestone

Comments

@ckken
Copy link

ckken commented Dec 12, 2022

Describe the bug

Inconsistent with babel result

Input code

[...new Array(100).keys()]

Config

No response

Playground link

No response

Expected behavior

[...new Array(100).keys()]
(100) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]

Actual behavior

[...new Array(100).keys()] [Array Iterator]

Version

1.3.22

Additional context

No response

@ckken ckken added the C-bug label Dec 12, 2022
@kdy1
Copy link
Member

kdy1 commented Dec 12, 2022

I think this is related to helpers

@kdy1 kdy1 added this to the Planned milestone Dec 12, 2022
@magic-akari
Copy link
Member

Are you using swc in loose mode?

@ckken
Copy link
Author

ckken commented Dec 13, 2022

Are you using swc in loose mode?

try it later

@ckken
Copy link
Author

ckken commented Dec 13, 2022

loose:false it work for me ! thanks

@ckken ckken closed this as completed Dec 13, 2022
@kdy1 kdy1 modified the milestones: Planned, v1.3.23 Dec 14, 2022
@swc-bot
Copy link
Collaborator

swc-bot commented Jan 13, 2023

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Jan 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants