aboutsummaryrefslogtreecommitdiff
path: root/doc/go_spec.html
diff options
context:
space:
mode:
authorgriesemer <gri@golang.org>2017-08-24 15:05:53 +0200
committerRobert Griesemer <gri@golang.org>2017-08-25 08:09:57 +0000
commit84ac90ebf1b2e6a747eec1469230087fe71c0ce9 (patch)
tree29d34a181bae032ed8cb908cfd65868153cd3047 /doc/go_spec.html
parent770d8d8207dbbbabf12d644e70b74d89f5bf595f (diff)
downloadgo-84ac90ebf1b2e6a747eec1469230087fe71c0ce9.tar.gz
go-84ac90ebf1b2e6a747eec1469230087fe71c0ce9.zip
spec: clarify nil case in type switches
The old wording seemed to imply that nil is a kind of type. Slightly reworded for clarity. Fixes #21580. Change-Id: I29898bf0125a10cb8dbb5c7e63ec5399ebc590ca Reviewed-on: https://go-review.googlesource.com/58490 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'doc/go_spec.html')
-rw-r--r--doc/go_spec.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html
index 184b6960f4..6c0dc8bbd5 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1,6 +1,6 @@
<!--{
"Title": "The Go Programming Language Specification",
- "Subtitle": "Version of August 14, 2017",
+ "Subtitle": "Version of August 25, 2017",
"Path": "/ref/spec"
}-->
@@ -4820,8 +4820,9 @@ in the TypeSwitchGuard.
</p>
<p>
-The type in a case may be <a href="#Predeclared_identifiers"><code>nil</code></a>;
-that case is used when the expression in the TypeSwitchGuard
+Instead of a type, a case may use the predeclared identifier
+<a href="#Predeclared_identifiers"><code>nil</code></a>;
+that case is selected when the expression in the TypeSwitchGuard
is a <code>nil</code> interface value.
There may be at most one <code>nil</code> case.
</p>