Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec: Index expressions spec is fragmented for map type code #59315

Closed
johnsyweb opened this issue Mar 29, 2023 · 3 comments
Closed

spec: Index expressions spec is fragmented for map type code #59315

johnsyweb opened this issue Mar 29, 2023 · 3 comments
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@johnsyweb
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.20.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
```
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/paj/Library/Caches/go-build"
GOENV="/Users/paj/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/paj/.asdf/installs/golang/1.20.2/packages/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/paj/.asdf/installs/golang/1.20.2/packages"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/paj/.asdf/installs/golang/1.20.2/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/paj/.asdf/installs/golang/1.20.2/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.20.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4d/zd6b5xpn7rq00306yspzfy3r0000gn/T/go-build17349328=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Reading the Index expressions spec at https://go.dev/ref/spec#Map_types to determine how to handle the case where a key is not present in a map.

What did you expect to see?

Information about the above.

What did you see instead?

Information about type parameter types, introduced in 68da368 .

Note

Pull request incoming.

@gopherbot
Copy link

Change https://go.dev/cl/480315 mentions this issue: doc: defragment index expresions spec for map types

@mknyszek mknyszek changed the title doc: Index expressions spec is fragmented for map type code spec: Index expressions spec is fragmented for map type code Apr 3, 2023
@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 3, 2023
@mknyszek mknyszek added this to the Backlog milestone Apr 3, 2023
@mknyszek
Copy link
Contributor

mknyszek commented Apr 3, 2023

CC @griesemer @ianlancetaylor

@griesemer
Copy link
Contributor

Thanks for the suggestion but the index expression spec section is fine as is. The comma-ok expression is special which is why it's at the end. There's nothing to do here. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants