You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Henrique\AppData\Local\go-build
set GOENV=C:\Users\Henrique\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Henrique\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Henrique\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.18.3
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\Henrique\Documents\project\go.mod
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Henrique\AppData\Local\Temp\go-build740287764=/tmp/go-build -gno-record-gcc-switches
What did you do?
I selected a return parameter of a multi-value function with two variables sharing a type definition (salt and key).
What did you expect to see?
I expected the correct (err, fourth position) return values to be highlighted in the function body.
What did you see instead?
The incorrect return values got highlighted instead.
I believe this happens because gopls does not differentiate (named) return values that share a type (declared as var1, var2 type).
This does not appear to happen with function arguments.
Here's a video that better demonstrates the behavior when selecting different variables:
The text was updated successfully, but these errors were encountered:
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
Jun 3, 2023
This ended up being more complicated than expected -- I found several inconsistencies in the highlighting logic -- so it will have to wait until after v0.12.3, which we're trying to cut this week. Moving to v0.12.4.
gopls version
go env
What did you do?
I selected a return parameter of a multi-value function with two variables sharing a type definition (
salt
andkey
).What did you expect to see?
I expected the correct (
err
, fourth position) return values to be highlighted in the function body.What did you see instead?
The incorrect return values got highlighted instead.
I believe this happens because gopls does not differentiate (named) return values that share a type (declared as
var1, var2 type
).This does not appear to happen with function arguments.
Here's a video that better demonstrates the behavior when selecting different variables:
2023-06-03.17-38-43.mp4
Editor and settings
Visual Studio Code (no relevant settings)
Logs
No relevant logs that I could see.
The text was updated successfully, but these errors were encountered: