• griesemer's avatar
    spec: match syntax for method expressions with implementations · f2d52519
    griesemer authored
    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/73233Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    f2d52519
Name
Last commit
Last update
..
articles Loading commit data...
codewalk Loading commit data...
devel Loading commit data...
editors Loading commit data...
gopher Loading commit data...
play Loading commit data...
progs Loading commit data...
asm.html Loading commit data...
cmd.html Loading commit data...
code.html Loading commit data...
conduct.html Loading commit data...
contrib.html Loading commit data...
contribute.html Loading commit data...
debugging_with_gdb.html Loading commit data...
diagnostics.html Loading commit data...
docs.html Loading commit data...
editors.html Loading commit data...
effective_go.html Loading commit data...
gccgo_contribute.html Loading commit data...
gccgo_install.html Loading commit data...
go-logo-black.png Loading commit data...
go-logo-blue.png Loading commit data...
go-logo-white.png Loading commit data...
go1.1.html Loading commit data...
go1.2.html Loading commit data...
go1.3.html Loading commit data...
go1.4.html Loading commit data...
go1.5.html Loading commit data...
go1.6.html Loading commit data...
go1.7.html Loading commit data...
go1.8.html Loading commit data...
go1.9.html Loading commit data...
go1.html Loading commit data...
go1compat.html Loading commit data...
go_faq.html Loading commit data...
go_mem.html Loading commit data...
go_spec.html Loading commit data...
help.html Loading commit data...
ie.css Loading commit data...
install-source.html Loading commit data...
install.html Loading commit data...
root.html Loading commit data...
security.html Loading commit data...
share.png Loading commit data...
tos.html Loading commit data...