]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: confusing error if composite literal field is a method
authorMichael Fraenkel <michael.fraenkel@gmail.com>
Wed, 23 Jan 2019 00:10:29 +0000 (19:10 -0500)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 26 Feb 2019 18:42:07 +0000 (18:42 +0000)
commit6d781decad8cde821245d03189a1f87021d6671c
treebd43950583394c18e3873571dff0f92b1d3869f5
parentc6e47069af1a4e93547450e34253da2b22b9c23d
cmd/compile: confusing error if composite literal field is a method

When looking for the field specified in a composite literal, check that
the specified name is actually a field and not a method.

Fixes #29855.

Change-Id: Id77666e846f925907b1eec64213b1d25af8a2466
Reviewed-on: https://go-review.googlesource.com/c/158938
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/gc/reflect.go
src/cmd/compile/internal/gc/subr.go
src/cmd/compile/internal/gc/typecheck.go
src/cmd/compile/internal/types/type.go
test/fixedbugs/issue29855.go [new file with mode: 0644]