Allow 'of' to be a name.

This commit is contained in:
Fábio Santos
2015-10-26 20:56:59 +00:00
parent 246ec416c0
commit 2cce61c564
2 changed files with 19 additions and 2 deletions

View File

@@ -158,3 +158,20 @@ regression_cannot_destructure: {
expect_exact: "var x={x:3};x({x:3});";
}
regression_cannot_use_of: {
input: {
function of() {
}
var of = "is a valid variable name";
of = { of: "is ok" };
x.of;
of: foo()
}
expect: {
function of(){}
var of="is a valid variable name";
of={of:"is ok"};
x.of;
foo(); /* Label statement missing? No prob. */
}
}