If this proposal were to be accepted, can an ExpressionStatement start with using [?
Eg, how should the code below be interpreted?
function foo() {
return {};
}
const a = 1;
var using = [];
{
using [a] = foo();
}
There is currently nothing in the proposal that adds a restriction on ExpressionStatement to prevent an ExpressionStatement to start with using [. This implies that the line using [a] = foo(); can be interpreted as an ExpressionStatement and as a UsingDeclaration.
I just notice that there is a new parameter Pattern in BindingList that would prevent this from being interpreted as a UsingDeclaration. Sorry for the noise.
If this proposal were to be accepted, can an
ExpressionStatement
start withusing [
?Eg, how should the code below be interpreted?
There is currently nothing in the proposal that adds a restriction on
ExpressionStatement
to prevent anExpressionStatement
to start withusing [
. This implies that the lineusing [a] = foo();
can be interpreted as anExpressionStatement
and as aUsingDeclaration
.