From: Robert Griesemer Date: Thu, 18 Aug 2016 20:14:30 +0000 (-0700) Subject: spec: update language on type switches to match implementations X-Git-Tag: go1.8beta1~1530 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f8555ea6fdbbfc32e26f351ac16138fad31a2d62;p=gostls13.git spec: update language on type switches to match implementations See the issue below for details. Fixes #16794. Change-Id: I7e338089fd80ddcb634fa80bfc658dee2772361c Reviewed-on: https://go-review.googlesource.com/27356 Reviewed-by: Ian Lance Taylor --- diff --git a/doc/go_spec.html b/doc/go_spec.html index 77ece54d52..1d0ea22c7c 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -4690,8 +4690,8 @@ TypeList = Type { "," Type } .

The TypeSwitchGuard may include a short variable declaration. -When that form is used, the variable is declared at the beginning of -the implicit block in each clause. +When that form is used, the variable is declared at the end of the +TypeSwitchCase in the implicit block of each clause. In clauses with a case listing exactly one type, the variable has that type; otherwise, the variable has the type of the expression in the TypeSwitchGuard.