minifier: typeof <class>
should be evaluated as "function"
, not "object"
#9453
Labels
Milestone
typeof <class>
should be evaluated as "function"
, not "object"
#9453
Describe the bug
typeof <class>
should be evaluated as a"function"
because classes have[[Call]]
internal slot like a function. MDN reference also noted this behavior.Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.7.12&code=H4sIAAAAAAAAA1MqLU5VKC4pykwuUbLmSs5JLC5WqFCoruVKzs8rzs9J1cvJT9coqSxIzU9TqNC0BgDpvrE7LwAAAA%3D%3D&config=H4sIAAAAAAAAA32VO5LbMAyG%2B5zCozpFxkWKHCCzTc7AoUlQppcPDQF6rdnx3QNR8mPXkDoLH36ABED488du153QdH92n%2FyTPwZdEMr9my04JtIXtnRgokZT%2FEDdzxs94YScDgjNdJ1JR7r0QE2F%2B1%2F7%2FaLoQs4IN8Viiz55Nz7nNDkOBRCfbGzlkDVCIvyqX1jJHxOgUp%2Fth5wD6LRBlEblE0EPRQpscgh6QFBnXYQo00l18ZilFBOsBFYNJQ8iT9aTz4lzvlIL2iqTLQjIFzDkzyDJOBfLEvL1hPs0bOFQ%2B771%2BZsazjpUTUJOuLSW8GmFqMfskZSrSSrhDFdqMMOluN%2BV3qkCVEt61Z2yTys9eQfgCgSNmHQEKW7zcDxPa2q3qfTJ8cjSKHCeb%2BmWCXouqvLeCZWdKgOFvNTNArYamCprpOMseKV86C0ocI5nRQiNH57MUUpK4wDZCYD7q500VTNQ91e4wqcHsYH%2F8i1JHrDFI2o6rlMc4yGHjQQR6JjthgO3gvI6LrwlLsM6r8kCjwZY0aViA69LgB8AZRXavnyZDX4eHFH1IR8ea2JxuN73cNSpf7z3L6sYLgSFV8wbhAHKU4Tm0MVsa1Mu%2FwBT8%2Be9%2Fbt7ON1W9P1Wncd%2FN%2BWc8%2FofsXtHPU4GAAA%3D
SWC Info output
No response
Expected behavior
Actual behavior
Version
1.7.12
Additional context
No response
The text was updated successfully, but these errors were encountered: