commit | 75a22d0d107d291c2dbb78dce7017cffe6531b49 | [log] [tgz] |
---|---|---|
author | Matthew Dempsky <mdempsky@google.com> | Fri Apr 01 16:43:43 2016 -0700 |
committer | Matthew Dempsky <mdempsky@google.com> | Sat Apr 02 00:06:30 2016 +0000 |
tree | a7d45d0a45019c2d57eba0df531e9d8fe5ff14fc | |
parent | 683448a304a3871039ab44fc01e839f05ac36f05 [diff] |
cmd/compile: eliminate dead code in walkappend The IsStruct case is meant to handle cases like append(f()) where f's result parameters are something like ([]int, int, int). However, at this point in the compiler we've already rewritten append(f()) into "tmp1, tmp2, tmp3 := f(); append(tmp1, tmp2, tmp3)". As further evidence, the t.Elem() is not a valid method call for a struct type anyway, which would trigger the Fatalf call in Type.Elem if this code was ever hit. Change-Id: Ia066f93df66ee3fadc9a9a0f687be7b5263af163 Reviewed-on: https://go-review.googlesource.com/21427 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
For documentation about how to install and use Go, visit https://golang.org/ or load doc/install-source.html in your web browser.
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.
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this file). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install-source.html). You should also add the Go binary directory $GOROOT/bin to your shell's path.
For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile:
export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin
See https://golang.org/doc/install or doc/install.html for more details.