]> Cypherpunks repositories - gostls13.git/commit
go spec: adjust notion of Assignability
authorRobert Griesemer <gri@golang.org>
Thu, 3 Feb 2011 18:53:31 +0000 (10:53 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 3 Feb 2011 18:53:31 +0000 (10:53 -0800)
commitfa3d0d73f0e0559f63dd14d09fc167c89df9fe54
tree910226e52f69b28be910031ef469f01940c7d8d7
parentab15a978fb9d5b9caa68b103377720c27b779468
go spec: adjust notion of Assignability

This change makes it legal to pass a struct value as receiver
outside the package declaring the struct even if the respective
struct type has non-exported fields.

This is a backwards-compatible language change motivated by the
fact that it is already possible to circumvent the assignment
restriction when calling methods through interfaces (see issue
1402).

R=r, rsc, iant, ken2
CC=golang-dev
https://golang.org/cl/3926044
doc/go_spec.html