Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
98553f14
Commit
98553f14
authored
Dec 05, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spec: remove contentious composite literal shortening
R=gri, r, gustavo, r CC=golang-dev
https://golang.org/cl/5451099
parent
abc7df96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
doc/go_spec.html
doc/go_spec.html
+1
-10
No files found.
doc/go_spec.html
View file @
98553f14
<!-- 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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment