Files
test-repo/tests/arrows/arrow_function_expression.js
T
Christopher Chedeau c8615ed9a6 Add parenthesis for arrow function inside of ternary (#408)
This one is really weird

```js
if (() => {} ? 1 : 0) {}
```

parses fine but

```js
if (() => {
} ? 1 : 0) {}
```

is a syntax error. Let's always add a parenthesis.

Note that no one is every going to write this in practice, this is really useless :p
2017-01-22 16:16:57 -08:00

8 lines
138 B
JavaScript

(a => {}).length
typeof (() => {});
export default (() => {})();
(() => {})()``;
(() => {})``;
new (() => {});
if ((() => {}) ? 1 : 0) {}