destructuring should visit children of for stmt or not ? #9647
stormslowly
started this conversation in
General
Replies: 1 comment 1 reply
-
It‘s a definitely a bug |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi @kdy1 :
in destructuring visitor
swc/crates/swc_ecma_compat_es2015/src/destructuring.rs
Lines 129 to 140 in 88a2186
after transform the first "level" for of stmt, it just skips visiting its children, so the nested for of stmt will be ignored, if we use destructuring separately .
is it by design or bug?
my workaround is using
for_of
transform before destructuring. or destructuring is not supposed to used separately ?Beta Was this translation helpful? Give feedback.
All reactions