From 84ac90ebf1b2e6a747eec1469230087fe71c0ce9 Mon Sep 17 00:00:00 2001
From: griesemer
Date: Thu, 24 Aug 2017 15:05:53 +0200
Subject: [PATCH] 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
Reviewed-by: Matthew Dempsky
Reviewed-by: Rob Pike
---
doc/go_spec.html | 7 ++++---
1 file 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 @@
@@ -4820,8 +4820,9 @@ in the TypeSwitchGuard.
-The type in a case may be nil
;
-that case is used when the expression in the TypeSwitchGuard
+Instead of a type, a case may use the predeclared identifier
+nil
;
+that case is selected when the expression in the TypeSwitchGuard
is a nil
interface value.
There may be at most one nil
case.
--
2.50.0