From 041d11623f0332feacb15d3e10e29eec8c64200f Mon Sep 17 00:00:00 2001
From: Rob Pike
Date: Tue, 13 Jul 2010 16:23:54 -0700
Subject: [PATCH] Go specification: Lock down some details about channels and
select: - nil channel in regular send or receive panics - empty select blocks
forever
R=rsc, gri, iant, ken2
CC=golang-dev
https://golang.org/cl/1825043
---
doc/go_spec.html | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/doc/go_spec.html b/doc/go_spec.html
index 13c4c2452c..598bc928d3 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -17,7 +17,6 @@ TODO
[ ] specify iteration direction for range clause
[ ] review language on implicit dereferencing
[ ] clarify what it means for two functions to be "the same" when comparing them
-[ ] need to specify what happends when sending/receiving from a nil channel
-->
@@ -3063,6 +3062,12 @@ to false
and x
is set to the
zero value for its type (ยงThe zero value).
+
+Except in a communications clause of a select statement,
+sending or receiving from a nil
channel causes a
+run-time panic.
+
+