compiler: parenthesize channel type strings if necessary

Avoid the ambiguity between "chan <- (chan int)" and "chan (<- chan int)".
This parenthesizes the same way as the gc compiler.

Change-Id: I638c89058c48c486121ecb67a5f7285f099505c7
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/279961
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
1 file changed