Skip to content

x/tools/gopls: unnamed generics parameter formatted to be unparened and named in go2go #40681

@tamayika

Description

@tamayika

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

$ go version
go version devel +ead7e9b351 Sat Aug 1 05:14:38 2020 +0000 linux/amd64
$ gopls version
golang.org/x/tools/gopls master
    golang.org/x/tools/[email protected] h1:0SxHeccMdwJg02GN5PuFGSus9SSmA6FFOpuyRTnjrac=

Does this issue reproduce with the latest release?

No(go2go development)

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/owner/.cache/go-build"
GOENV="/home/owner/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/owner/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/owner/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/owner/go2"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/owner/go2/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build789186970=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Save and format below file in VSCode. (I followed installation here)

package main

type iface(type T) interface {
}

type some(type T) struct {
	f func(T, iface(T))
}

What did you expect to see?

package main

type iface(type T) interface {
}

type some(type T) struct {
	f func(T, iface(T))
}

What did you see instead?

package main

type iface(type T) interface {
}

type some(type T) struct {
	f func(T, iface T)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions