export const example1 = (param)=>(param)=>param.["There is something wrong!"[;
export const example2 = (param)=>(param)=>param["123 is fine"];
export const example3 = (param)=>(param)=>param["! That is fine !"];
export const example4 = (param)=>(param)=>param[" space in start works fine"];
export const example5 = (param)=>(param)=>param[123];
Actual behavior
export const example1 = (param)=>(param)=>param.There is something wrong!;
export const example2 = (param)=>(param)=>param["123 is fine"];
export const example3 = (param)=>(param)=>param["! That is fine !"];
export const example4 = (param)=>(param)=>param[" space in start works fine"];
export const example5 = (param)=>(param)=>param[123];
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.
Describe the bug
When
compress.arguments
istrue
it brokes index accesses when index is string and matches/^[a-z]/i
. Onlyexample1
will fail.Input code
Config
Playground link
https://play.swc.rs/?version=1.3.37&code=H4sIAAAAAAAAA4XPvQ6CQBAE4P6eYqDSEtDK4FPQEYsNWbmL3k%2F2LoHH95TQSa6bZr7M8Bq8JEzexQReyYY3N%2BhxCiRkz%2BjvCvjlHLcw1oNmYZiI6C0nbdyMRbybq%2FpxU4r%2FkG2JbNruCz6N40OkKyEVBk1pd3A851KSEANN%2BaJDTJTbi5dXYd21YOaHufoBjMAqg3ABAAA%3D&config=H4sIAAAAAAAAA22TQZLjIAxF7%2BJ1FlNZ9KIPMLs%2BA6WAcOjByIVEOq5U7j7CsXGc9M56%2FhLiS9y6b7bd560bITPm%2BsVTErh2nx3aAdjmMEp3UJkiD5HxfugEco9SJXz8czzq70jEuAgO3RBS8FMtZmkYMzLXb00qAybRQHJRGeRMPy06EUWE9BYbYBOSYI%2BZ2wmWYoSR0Vwgt4x6GOTAlHaoCDozZhqfaHJBAiUttjKH4Iwlhw2EjFbCBTeJ1lBJYm2sdTJDh6fS99W%2FhxIvEAtIq4XX2QU9seWdKbAYXxK%2FoF2nD%2FS45KIK3mSUktOq%2BaaQdj78Q9Q%2BIzAnGHDLnLnXMeyV%2FhdVSF5nKFOjOuCtq4S9Xs6E4NsNa9eYJWxuZXTFYr2h3YovcHchDg4Neq9ut2T%2BCWLPWzGZRiTfQnUN%2FDaDR2jWfdrTugJv8K92Jc%2FjWPgAcn5lPA0nim8lBpQzuTesRgi9wqzbex1faUkO1WZ0Tz8K17CtqQ5fyMT62FafdSE0x%2FSRTm199U0OkPq2lvcKyJUKbrN582P96O7b41zXib8W4VzoP9zQhRURBAAA
Expected behavior
Actual behavior
Version
1.3.37
Additional context
No response