summaryrefslogtreecommitdiff
path: root/doc/go_spec.html
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2017-03-24 09:19:46 -0700
committerRobert Griesemer <gri@golang.org>2017-03-24 18:51:10 +0000
commit369d1083a74b6a965a33510489ab381d937812ae (patch)
tree88d88b8fed6770b46a50892459347930b08952d1 /doc/go_spec.html
parente00e57d67cea33d4faef8506ced6f3c2416cfd15 (diff)
downloadgo-git-369d1083a74b6a965a33510489ab381d937812ae.tar.gz
spec: for non-constant map keys, add reference to evaluation order section
The section on map literals mentions constant map keys but doesn't say what happens for equal non-constant map keys - that is covered in the section on evaluation order. Added respective link for clarity. Fixes #19689. Change-Id: If9a5368ba02e8250d4bb0a1d60d0de26a1f37bbb Reviewed-on: https://go-review.googlesource.com/38598 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'doc/go_spec.html')
-rw-r--r--doc/go_spec.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html
index fa95caca3a..5ee8287889 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1,6 +1,6 @@
<!--{
"Title": "The Go Programming Language Specification",
- "Subtitle": "Version of February 12, 2017",
+ "Subtitle": "Version of March 24, 2017",
"Path": "/ref/spec"
}-->
@@ -2295,7 +2295,8 @@ The key is interpreted as a field name for struct literals,
an index for array and slice literals, and a key for map literals.
For map literals, all elements must have a key. It is an error
to specify multiple elements with the same field name or
-constant key value.
+constant key value. For non-constant map keys, see the section on
+<a href="#Order_of_evaluation">evaluation order</a>.
</p>
<p>