1
0
mirror of https://github.com/golang/go synced 2024-11-23 11:20:05 -07:00
go/doc
Robert Griesemer 3d81d4adc9 spec: document that duplicate types are invalid in type switches
Both compilers and also go/types don't permit duplicate types in
type switches; i.e., this spec change is documenting a status quo
that has existed for some time.

Furthermore, duplicate nils are not accepted by gccgo or go/types;
and more recently started causing a compiler error in gc. Permitting
them is inconsistent with the existing status quo.

Rather than making it an implementation restriction (as we have for
expression switches), this is a hard requirement since it was enforced
from the beginning (except for duplicate nils); it is also a well
specified requirement that does not pose a significant burden for
an implementation.

Fixes #15896.

Change-Id: If12db5bafa87598b323ea84418cb05421e657dd8
Reviewed-on: https://go-review.googlesource.com/23584
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-05-31 23:53:43 +00:00
..
articles
codewalk all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
devel doc: update broken links in release notes 2016-05-05 20:32:06 +00:00
gopher
play doc/play: update URL for concurrent pi 2016-01-06 20:23:21 +00:00
progs all: remove executable bit from several files 2015-09-04 02:59:49 +00:00
asm.html doc: fix remaining TODOs in Go 1.6 release notes 2016-02-16 16:46:17 +00:00
cmd.html doc: fix broken link to the vet command documentation 2016-05-16 21:30:31 +00:00
code.html doc: add Overview and other small edits to How To Write Go Code 2016-01-12 01:56:04 +00:00
conduct.html doc: Americanise spelling of wilful 2015-12-17 21:32:59 +00:00
contrib.html doc: add link to 1.6 release notes on golang.org/project page 2016-03-03 01:11:02 +00:00
contribute.html doc: add notes on good commit messages 2016-05-24 19:23:18 +00:00
debugging_with_gdb.html doc: fix source link in gdb docs 2016-01-06 21:58:19 +00:00
docs.html
effective_go.html doc/effective_go: clarify backward function reference 2016-05-18 13:17:34 +00:00
gccgo_contribute.html
gccgo_install.html
go1.1.html
go1.2.html
go1.3.html
go1.4.html
go1.5.html doc: mention that go install removes binaries built by go build 2015-09-08 18:46:07 +00:00
go1.6.html doc: GCC 6 will have the Go 1.6.1 user libraries 2016-04-14 20:00:33 +00:00
go1.7.html doc/go1.7.html: make RFC an actual link 2016-05-31 21:17:23 +00:00
go1.html
go1compat.html doc: add a clause about embedded methods to go1compat 2015-07-22 01:25:32 +00:00
go_faq.html doc/faq: reword the link to the generics proposal 2016-04-20 20:51:52 +00:00
go_mem.html
go_spec.html spec: document that duplicate types are invalid in type switches 2016-05-31 23:53:43 +00:00
go-logo-black.png
go-logo-blue.png
go-logo-white.png
help.html doc: revise help page with categories and more links 2016-01-14 03:15:39 +00:00
ie.css
install-source.html all: fixed a handful of typos 2016-05-24 21:18:03 +00:00
install.html doc: remove mention of %HOME% from installation instructions 2016-05-10 18:55:14 +00:00
root.html doc: only show Share button when enabled 2015-09-02 05:58:52 +00:00
security.html doc: security fixes are prepared for two most recent stable releases 2016-03-09 03:32:23 +00:00
share.png
tos.html