go/src
Daniel Martí ba6974fdc3 cmd/compile: fix crash on invalid struct literal
If one tries to use promoted fields in a struct literal, the compiler
errors correctly. However, if the embedded fields are of struct pointer
type, the field.Type.Sym.Name expression below panics.

This is because field.Type.Sym is nil in that case. We can simply use
field.Sym.Name in this piece of code though, as it only concerns
embedded fields, in which case what we are after is the field name.

Added a test mirroring fixedbugs/issue23609.go, but with pointer types.

Fixes #26416.

Change-Id: Ia46ce62995c9e1653f315accb99d592aff2f285e
Reviewed-on: https://go-review.googlesource.com/124395
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2018-07-18 20:32:04 +00:00
..
archive archive/zip: fix regression when writing directories 2018-07-16 22:52:11 +00:00
bufio bufio: clarify SplitFunc docs for nil token 2018-06-13 21:43:06 +00:00
builtin
bytes bytes, strings: fix comparison of long byte slices on s390x 2018-06-29 20:48:07 +00:00
cmd cmd/compile: fix crash on invalid struct literal 2018-07-18 20:32:04 +00:00
compress all: update comment URLs from HTTP to HTTPS, where possible 2018-06-01 21:52:00 +00:00
container
context context: add docs to ExampleWithValue 2018-06-12 22:33:54 +00:00
crypto crypto/x509: add GODEBUG option x509ignoreCN=1 2018-07-16 19:30:55 +00:00
database/sql database/sql: update doc related to per-connection state 2018-06-06 18:18:20 +00:00
debug debug/elf,macho,pe: support compressed DWARF 2018-06-19 22:13:51 +00:00
encoding encoding/gob: correct issue number typo in comment 2018-06-13 05:33:59 +00:00
errors
expvar
flag flag: add a Value example 2018-06-21 23:32:53 +00:00
fmt
go go/types: record type information after detecting error 2018-07-12 22:12:51 +00:00
hash all: update comment URLs from HTTP to HTTPS, where possible 2018-06-01 21:52:00 +00:00
html html/template: ignore untyped nil arguments to default escapers 2018-07-09 21:54:35 +00:00
image all: clean up some Deprecated comments 2018-07-06 17:40:56 +00:00
index/suffixarray index/suffixarray: fix a typo mistake in comments 2018-05-29 12:16:51 +00:00
internal doc: update the minimum support Windows version 2018-07-11 22:05:38 +00:00
io
log log/syslog: skip tests that depend on daemon on builders 2018-05-22 18:26:03 +00:00
math math/big: handle negative exponents in Exp 2018-06-14 22:26:30 +00:00
mime mime/quotedprintable: accept bytes >= 0x80 2018-06-27 17:00:08 +00:00
net http/internal: document final CRLF behavior on chunkedWriter 2018-07-17 02:23:17 +00:00
os os/exec: document ExtraFiles is not supported on windows 2018-07-13 22:29:48 +00:00
path filepath: updates doc to give case where WalkFunc info arg may be nil 2018-07-18 19:53:37 +00:00
plugin plugin: make stub lookup signature match dlopen version 2018-05-08 17:09:05 +00:00
reflect reflect: remove struct tags from unexported types 2018-06-28 23:06:00 +00:00
regexp regexp: reword Match documentation to be more like Find 2018-07-13 18:52:46 +00:00
runtime Revert "runtime: fix lldb test after DWARF compression" 2018-07-17 16:25:47 +00:00
sort all: update comment URLs from HTTP to HTTPS, where possible 2018-06-01 21:52:00 +00:00
strconv strconv: add missing period to godoc comment 2018-06-09 01:26:25 +00:00
strings strings: do much less redundant testing in TestCompareStrings 2018-07-02 14:39:29 +00:00
sync cmd/vet,sync: check lock values more precisely 2018-07-14 06:48:21 +00:00
syscall syscall: update check for UserNS support for CentOS 7.5+ 2018-07-18 01:16:24 +00:00
testing testing/cover: improve comments on CoverBlock 2018-07-01 08:07:47 +00:00
text html/template: ignore untyped nil arguments to default escapers 2018-07-09 21:54:35 +00:00
time time: fix typo in Truncate example 2018-07-12 15:01:16 +00:00
unicode unicode: fix SpecialCase to follow its docs & respect explict no-op mappings 2018-06-17 08:48:39 +00:00
unsafe
vendor/golang_org/x vendor: update vendored x/net/http/httpproxy 2018-07-09 19:35:21 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash
make.bash make.bash: don't pass GOOS and GOARCH to cmd/go when finding GOROOT_BOOTSTRAP 2018-06-20 16:04:33 +00:00
make.bat
make.rc
naclmake.bash
nacltest.bash
race.bash runtime/cgo: Add initial NetBSD Thread Sanitizer support 2018-07-10 23:14:31 +00:00
race.bat
run.bash
run.bat
run.rc