Skip to content

--experimental-transform-types breaks &&= short circuiting #59737

@ssalbdivad

Description

@ssalbdivad

Version

24.4.0

Platform

Linux ssalb-xps 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

const ark = {}

ark.foo &&= `${ark.foo}1`

// ✅ without --experimental-transform-types: "undefined"
// ❌ with --experimental-transform-types: "undefinedundefined1"
console.log(ark.foo)

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

Should output undefined

What do you see instead?

"undefinedundefined1"

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.strip-typesIssues or PRs related to strip-types support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions