You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Something is going wrong with function inlining and object property assignment. Please see my expected/actual and input/output below:
Input code
Config
Playground link
https://play.swc.rs/?version=1.3.32&code=H4sIAAAAAAAAA22Quw6CMBSG9z7F2aCJ4QFI3HRwNk7GAcspnFha04uL4d1tQeQStybffzsVRjujsFCmyWtzNh36lnSTc86YDFp4MhpWAN4MwKIPVoOs7pZE5fH4Qu1zzvqFawsHo0IPNUrYg7A4sQPK6J1jkxCSbDc8ApUgTPckNcovlEfGE%2BxXjX9Ev9JALpZebyzlueIZXJsERSA%2BF0eyDtxsXN4%2BjqS6hExWDzzV2bw2c9N%2FZd%2BRH343a9FoAQAA&config=H4sIAAAAAAAAA22TQZLjIAxF7%2BJ1FjO9mJrqA8yuz0ApIBy6MXIhkY4rlbu3cGwcJ7Oznr%2BE%2BBLX7pNt937tRsiMuX7xlAQu3XuHdgC2OYzSHVSmyENkvB06gdyjVAm%2F%2Ffr9V39HIsZFcOiGkIKfajFLw5iRuX5rUhkwCTcd5EzfGkouGh2JIkJ6iQ2wCUmwx7ylWooRRkZzhtwy6mmQA1PaoSLozJhpfKDJBQmUtNjKHIIzlhw2EDJaCWfcJFpDJYm1sdbJDB0eS99XA%2B9KPEMsIK0WXmYb9MSWd6LAYnxJ%2FIR2nd7R%2FZKLKniTUUpOq%2BaTQtr58IWofUZgTjDgljlzr3PYK%2F1%2FVCF5HaJMjeqEt64S9no5E4JvN6xdY5awuZXRFYv1hnYrvsDdhTg4NOi9ut2S%2BTuIPW3FZBqRfAvVNfDbDO6hWfdpT%2BsKvMB%2F2pU8jmPhA8jpmfE0HCm%2BlBhQTuResBoh9Ayzbu9lfKYlOVSb0T38KFzDtqY6fCET62tbfdaF0BzTRzo%2BrO%2Bo0652ven7HCD1bUNvFZArFVxnH%2BeH%2B6e7bQ913Sz%2BWIS15u0HsrmeNh0EAAA%3D
Expected behavior
When running, something like
{def: {…}, ui: Array(1)}
should be outputted. Thedef
property should be populated.Actual behavior
When running, the output is
{def: undefined, ui: Array(1)}
. Thedef
property is undefined.The cause of the bug is obvious when looking at the compiled code. The
def1
variable is assigned to an object property before it is populated.There is some sort of bug with inlining functions and object literal property assignment.
Version
1.3.32
Additional context
This bug is affecting:
The text was updated successfully, but these errors were encountered: