Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
818e3cdb
Commit
818e3cdb
authored
Feb 22, 2012
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spec: refine the wording about variables in type switches
R=golang-dev, rsc CC=golang-dev
https://golang.org/cl/5686064
parent
d1e1367c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
go_spec.html
doc/go_spec.html
+3
-2
No files found.
doc/go_spec.html
View file @
818e3cdb
<!--{
<!--{
"Title": "The Go Programming Language Specification",
"Title": "The Go Programming Language Specification",
"Subtitle": "Version of February 2
1
, 2012"
"Subtitle": "Version of February 2
2
, 2012"
}-->
}-->
<!--
<!--
...
@@ -4023,7 +4023,8 @@ TypeList = Type { "," Type } .
...
@@ -4023,7 +4023,8 @@ TypeList = Type { "," Type } .
<p>
<p>
The TypeSwitchGuard may include a
The TypeSwitchGuard may include a
<a
href=
"#Short_variable_declarations"
>
short variable declaration
</a>
.
<a
href=
"#Short_variable_declarations"
>
short variable declaration
</a>
.
When that form is used, the variable is declared in each clause.
When that form is used, the variable is declared at the beginning of
the
<a
href=
"#Blocks"
>
implicit block
</a>
in each clause.
In clauses with a case listing exactly one type, the variable
In clauses with a case listing exactly one type, the variable
has that type; otherwise, the variable has the type of the expression
has that type; otherwise, the variable has the type of the expression
in the TypeSwitchGuard.
in the TypeSwitchGuard.
...
...
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