aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2020-12-30 18:43:10 -0800
committerMatthew Dempsky <mdempsky@google.com>2020-12-31 05:52:09 +0000
commit477b049060966e90124edf950413575f84a9aa74 (patch)
tree324146cc0d8bfe8ed539a4e961e4e471b882c743 /src/cmd/compile/internal/noder
parent178c667db2858f52965609b24857d5448dfb12c4 (diff)
downloadgo-477b049060966e90124edf950413575f84a9aa74.tar.xz
[dev.regabi] cmd/compile: fix printing of method expressions
OTYPE and OMETHEXPR were missing from OpPrec. So add them with the same precedences as OT{ARRAY,MAP,STRUCT,etc} and ODOT{,METH,INTER,etc}, respectively. However, ODEREF (which is also used for pointer types *T) has a lower precedence than other types, so pointer types need to be specially handled to assign them their correct, lower precedence. Incidentally, this also improves the error messages in issue15055.go, where we were adding unnecessary parentheses around the types in conversion expressions. Thanks to Cuong Manh Le for writing the test cases for #43428. Fixes #43428. Change-Id: I57e7979babe3ed9ef8a8b5a2a3745e3737dd785f Reviewed-on: https://go-review.googlesource.com/c/go/+/280873 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/noder')
0 files changed, 0 insertions, 0 deletions