vscode-nushell-lang
vscode-nushell-lang copied to clipboard
Chained assignment should be an error/warning
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).
Agreed, but that is probably a nushell problem vs a extension problem. All the diagnostics are generated from nushell.
Related feature request: https://github.com/nushell/nushell/issues/15883