1
0
mirror of https://github.com/golang/go synced 2024-11-24 06:00:11 -07:00
go/doc
griesemer 52dd39965e spec: clarify that each block has its own version of iota
Issue #15550 is clearly an esoteric case but the spec was silent
about it and we had diverging implementations. By making `iota`
and index that is relative to the respective constant declaration,
nested const declarations won't affect outer values of `iota`.

cmd/compile and go/types already follow this semantics.

Fixes #15550.

Change-Id: If138189e3ea4373f8ba50ac6fb1d219b481f8698
Reviewed-on: https://go-review.googlesource.com/71750
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-19 15:30:37 +00:00
..
articles doc: fix minor capitalization typo 2017-09-28 17:13:13 +00:00
codewalk
devel doc: add missing "Minor revisions" header for 1.9 2017-10-04 20:22:15 +00:00
editors
gopher
play
progs
asm.html
cmd.html
code.html
conduct.html
contrib.html
contribute.html doc: update contribute.html to clarify replying to reviews via email 2017-10-04 05:01:18 +00:00
debugging_with_gdb.html doc: update DWARF version 2017-09-06 20:26:48 +00:00
diagnostics.html doc: unify colons and spacing in diagnostics guide 2017-09-12 17:39:27 +00:00
docs.html doc: hide content blocked by GFW when served in CN 2017-09-11 14:59:59 +00:00
editors.html
effective_go.html doc: simplify Append example in "Effective Go" 2017-09-19 00:48:10 +00:00
gccgo_contribute.html
gccgo_install.html doc: update GCC release info in gccgo_install 2017-10-03 14:33:14 +00:00
go1.1.html
go1.2.html
go1.3.html
go1.4.html
go1.5.html
go1.6.html
go1.7.html
go1.8.html
go1.9.html
go1.html
go1compat.html
go_faq.html
go_mem.html
go_spec.html spec: clarify that each block has its own version of iota 2017-10-19 15:30:37 +00:00
go-logo-black.png
go-logo-blue.png
go-logo-white.png
help.html doc: hide content blocked by GFW when served in CN 2017-09-11 14:59:59 +00:00
ie.css
install-source.html doc: recommend building Go 1.4 with CGO_ENABLED=0 2017-10-12 01:03:14 +00:00
install.html
root.html
security.html
share.png
tos.html