commit | 70b277cf2e953bb9994b00898280f4659a47471e | [log] [tgz] |
---|---|---|
author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | Thu Mar 04 14:27:36 2021 +0700 |
committer | Cuong Manh Le <cuong.manhle.vn@gmail.com> | Fri Mar 05 18:45:59 2021 +0000 |
tree | 5c41e19b2b3877fa9ff731490d1b1727f7fb924f | |
parent | d4247f516724cae2e84a4d1bef71bd47aa2fd1d8 [diff] |
cmd/compile: only check return for valid functions CheckReturn uses fn.Type() unconditionally, so for invalid function, fn.Type() will be nil, causes the compiler crashes. Updates #43311 Change-Id: I4420dd296c72ea83986b38fbf2c7f51fa59757c8 Reviewed-on: https://go-review.googlesource.com/c/go/+/298709 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://golang.org/doc/contribute.html.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.