diff options
author | Russ Cox <rsc@golang.org> | 2011-12-05 14:22:23 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-12-05 14:22:23 -0500 |
commit | 98553f1422392f135989e0daafab352b66c561c2 (patch) | |
tree | 28edd131a1cfcc55cdf6ebf6fdc41e8cd3a0a39d | |
parent | abc7df9686839950f3a2ce108a5a683cce9001fe (diff) | |
download | go-98553f1422392f135989e0daafab352b66c561c2.tar.gz go-98553f1422392f135989e0daafab352b66c561c2.zip |
spec: remove contentious composite literal shortening
R=gri, r, gustavo, r
CC=golang-dev
https://golang.org/cl/5451099
-rw-r--r-- | doc/go_spec.html | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html index 04cab1dbb6..cded51a4a7 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,5 +1,5 @@ <!-- title The Go Programming Language Specification --> -<!-- subtitle Version of December 2, 2011 --> +<!-- subtitle Version of December 5, 2011 --> <!-- TODO @@ -2120,8 +2120,6 @@ elements that are themselves composite literals may elide the respective literal type if it is identical to the element type of <code>T</code>. Similarly, elements that are addresses of composite literals may elide the <code>&T</code> when the the element type is <code>*T</code>. -The same elisions may be applied to field values within a struct literal, -but only if the value has a field name key. </p> @@ -2131,13 +2129,6 @@ but only if the value has a field name key. [][]int{{1, 2, 3}, {4, 5}} // same as [][]int{[]int{1, 2, 3}, []int{4, 5}} [...]*Point{{1.5, -3.5}, {0, 0}} // same as [...]*Point{&Point{1.5, -3.5}, &Point{0, 0}} - -type List struct { - Val int - Next *List -} - -&List{Val: 1, Next: {Val: 2}} // same as &List{Val: 1, Next: &List{Val: 2}} </pre> <p> |