Weird grammar with function types and intersections
Abierto
parsing
- Lenguaje dominante
- Rust
- Estrellas
- 22.3k
- Forks
- 1.9k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
For some reason:
`=>` binds tighter than `&` when `&` comes first
```js
type A = boolean & number => void;
declare function a((boolean & number)): void;
(a: A); // ERROR
```
but `&` binds tighter than `=>` when `=>` comes first?
```js
type B = void => boolean & number;
declare function b(void): (boolean & number);
(b: B); // WORKS
```
It seems like it should be more consistent on both sides.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.