tshm icon indicating copy to clipboard operation
tshm copied to clipboard

Compiler shouldn't always print expression parentheses

Open samhh opened this issue 4 years ago • 0 comments

e.g. given input:

declare const f: (g: (() => void)) => void

We output:

f :: ((() -> void)) -> void

But should actually output (as we would if there weren't an expression grouping in the input):

f :: (() -> void) -> void

Or for a slightly more egregious example the following is output identically, needless parentheses intact:

type X = (((1)))

Is it possible to address this without delving into correctness checking?

samhh avatar Jan 09 '21 20:01 samhh