diff options
author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2023-10-07 22:54:50 +0700 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-10-08 23:15:25 +0000 |
commit | 2744155d369ca838be57d1eba90c3c6bfc4a3b30 (patch) | |
tree | 4159545d62473e270db7a856f711c96ca695a1ba /test | |
parent | f711892a8a4978b76a8fedecbd6fb7820736e145 (diff) | |
download | go-2744155d369ca838be57d1eba90c3c6bfc4a3b30.tar.gz go-2744155d369ca838be57d1eba90c3c6bfc4a3b30.zip |
cmd/compile: fix ICE with parenthesized builtin calls
CL 419456 starts using lookupObj to find types2.Object associated with
builtin functions. However, the new code does not un-parenthesized the
callee expression, causing an ICE because of nil obj returned.
Un-parenthesizing the callee expression fixes the problem.
Fixes #63436
Change-Id: Iebb4fbc08575e7d0b1dbd026c98e8f949ca16460
Reviewed-on: https://go-review.googlesource.com/c/go/+/533476
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/fixedbugs/issue63436.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/fixedbugs/issue63436.go b/test/fixedbugs/issue63436.go new file mode 100644 index 0000000000..bbd34a5a28 --- /dev/null +++ b/test/fixedbugs/issue63436.go @@ -0,0 +1,9 @@ +// compile + +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package p + +var _ = (new)(int) |