1
0
mirror of https://github.com/golang/go synced 2024-11-23 13:00:07 -07:00
go/doc
griesemer f2d52519e1 spec: match syntax for method expressions with implementations
A method expression is of the form T.m where T is a type and m
is a method of that type. The spec restricted T essentially to
a type name. Both cmd/compile and go/types accepted any type
syntactically, and a method expression was really just a form
of a selector expression x.f where x denotes a type.

This CL removes the spec syntax restriction from MethodExpr
to match the actual implementation. It also moves MethodExpr
from Operand to PrimaryExpr, because that's what it is.

It still keeps the separate notion of MethodExpr even though
it looks just like a selector expresion, since a MethodExpr
must start with a type rather than a value, and the spec's
syntax expresses this bit of semantics via distinct productions
(e.g., conversions look like calls but also must start with
a type).

Fixes #9060.

Change-Id: Idd84655b5b4f85d7ee53ebf749f73f0414a05f4a
Reviewed-on: https://go-review.googlesource.com/73233
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-25 22:49:03 +00:00
..
articles doc: fix minor capitalization typo 2017-09-28 17:13:13 +00:00
codewalk
devel doc: document Go 1.9.2 2017-10-25 16:09:24 +00:00
editors doc: add Atom to editor guide 2017-07-25 17:20:27 +00:00
gopher
play
progs cmd/cgo: support niladic function-like macros 2017-08-30 18:28:58 +00:00
asm.html
cmd.html
code.html doc: Proper default value for the $GOPATH. 2017-06-28 05:47:47 +00:00
conduct.html
contrib.html doc: add go1.9 to golang.org/project 2017-08-24 19:55:25 +00:00
contribute.html doc: update contribute.html to clarify replying to reviews via email 2017-10-04 05:01:18 +00:00
debugging_with_gdb.html doc: update DWARF version 2017-09-06 20:26:48 +00:00
diagnostics.html doc: unify colons and spacing in diagnostics guide 2017-09-12 17:39:27 +00:00
docs.html doc: hide content blocked by GFW when served in CN 2017-09-11 14:59:59 +00:00
editors.html doc: use better wording to explain type-aware completion 2017-08-04 20:18:16 +00:00
effective_go.html doc: simplify Append example in "Effective Go" 2017-09-19 00:48:10 +00:00
gccgo_contribute.html
gccgo_install.html doc: update GCC release info in gccgo_install 2017-10-03 14:33:14 +00:00
go1.1.html
go1.2.html
go1.3.html
go1.4.html
go1.5.html
go1.6.html
go1.7.html
go1.8.html
go1.9.html doc/1.9: add mention of net/http.LocalAddrContextKey 2017-08-28 19:21:54 +00:00
go1.html
go1compat.html
go_faq.html doc: add qualified mention of dep to FAQ 2017-06-20 16:07:41 +00:00
go_mem.html
go_spec.html spec: match syntax for method expressions with implementations 2017-10-25 22:49:03 +00:00
go-logo-black.png
go-logo-blue.png
go-logo-white.png
help.html doc: hide content blocked by GFW when served in CN 2017-09-11 14:59:59 +00:00
ie.css
install-source.html doc: recommend building Go 1.4 with CGO_ENABLED=0 2017-10-12 01:03:14 +00:00
install.html doc: update binary requirements 2017-06-29 22:14:58 +00:00
root.html doc: hide blog content for golang.google.cn 2017-08-03 17:32:52 +00:00
security.html
share.png
tos.html