Skip to content

Chained assignment should be an error/warning #203

@Kajiih

Description

@Kajiih

At the moment, we can write

$env.foo = $env.bar = "baz"

and even

let $foo = let $bar = "baz"

without any warning, but the resulting values are

$env.foo == null
$env.bar == "baz"

which is most likely not what was expected.

I think this should be reported as a warning (or even an error if there are no actual use cases for this syntax).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions