Change-Id: I8419bdaab5164388de846ccd942af1914ef944b7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/520075
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: shuang cui <imcusg@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
cui fliter 2023-08-16 23:12:51 +08:00 коммит произвёл Gopher Robot
Родитель b225aa0590
Коммит 9f2e103e08
4 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -12,8 +12,8 @@ import (
"go/types"
"text/template"
"golang.org/x/tools/internal/imports"
"golang.org/x/tools/gopls/internal/lsp/command/commandmeta"
"golang.org/x/tools/internal/imports"
)
const src = `// Copyright 2021 The Go Authors. All rights reserved.

Просмотреть файл

@ -10,10 +10,10 @@ import (
"fmt"
"os"
"golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/gocommand"
jsonrpc2_v2 "golang.org/x/tools/internal/jsonrpc2_v2"
"golang.org/x/tools/gopls/internal/lsp/protocol"
)
func GoEnvMiddleware() (Middleware, error) {

Просмотреть файл

@ -8,7 +8,7 @@ import (
"fmt"
)
// For each D, vec[D] has length D+1,
// For each D, vec[D] has length D+1,
// and the label for (D, k) is stored in vec[D][(D+k)/2].
type label struct {
vec [][]int

Просмотреть файл

@ -81,13 +81,13 @@ func CoreType(T types.Type) types.Type {
// restrictions may be arbitrarily complex. For example, consider the
// following:
//
// type A interface{ ~string|~[]byte }
// type A interface{ ~string|~[]byte }
//
// type B interface{ int|string }
// type B interface{ int|string }
//
// type C interface { ~string|~int }
// type C interface { ~string|~int }
//
// type T[P interface{ A|B; C }] int
// type T[P interface{ A|B; C }] int
//
// In this example, the structural type restriction of P is ~string|int: A|B
// expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int,