Update object literal expressions for readability
After @rwaldron's feedback: The purpose of the `!` operator is to evaluate an UnaryExpression, coerce the result to a boolean value and then return the negated value of that operation. But that's not what you're trying to do at all—you just want to evaluate the expression to the right of the operator, nothing more, nothing less. In this specific case, you don't even really care about the evaluation, the goal is write valid (or invalid, as the case may be) syntax that is will be parsed according to a specific grammar rule that requires some operator to signal that the thing is an expression and not a Block Statement.
Showing
- test/language/expressions/object/method-definition/early-errors-object-method-arguments-in-formal-parameters.js 2 additions, 2 deletions...ly-errors-object-method-arguments-in-formal-parameters.js
- test/language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js 2 additions, 2 deletions...nition/early-errors-object-method-async-lineterminator.js
- test/language/expressions/object/method-definition/early-errors-object-method-await-in-formals-default.js 2 additions, 2 deletions...on/early-errors-object-method-await-in-formals-default.js
- test/language/expressions/object/method-definition/early-errors-object-method-await-in-formals.js 2 additions, 2 deletions...definition/early-errors-object-method-await-in-formals.js
- test/language/expressions/object/method-definition/early-errors-object-method-body-contains-super-call.js 2 additions, 2 deletions...on/early-errors-object-method-body-contains-super-call.js
- test/language/expressions/object/method-definition/early-errors-object-method-duplicate-parameters.js 2 additions, 2 deletions...nition/early-errors-object-method-duplicate-parameters.js
- test/language/expressions/object/method-definition/early-errors-object-method-eval-in-formal-parameters.js 2 additions, 2 deletions...n/early-errors-object-method-eval-in-formal-parameters.js
- test/language/expressions/object/method-definition/early-errors-object-method-formals-body-duplicate.js 2 additions, 2 deletions...tion/early-errors-object-method-formals-body-duplicate.js
- test/language/expressions/object/method-definition/early-errors-object-method-formals-contains-super-call.js 2 additions, 2 deletions...early-errors-object-method-formals-contains-super-call.js
Loading
Please register or sign in to comment