зеркало из https://github.com/golang/tools.git
gopls/internal/test/marker: re-enable some tests
Re-enable (with adjustment) some tests that were disabled while staging standard library changes to parsing and printing. Fixes golang/go#54822 Change-Id: I7d54ce96b10f294dae257e8403983b25541a158f Reviewed-on: https://go-review.googlesource.com/c/tools/+/557397 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Родитель
060c748a28
Коммит
94d99e3406
|
@ -1,9 +1,11 @@
|
|||
This test checks completion of nested composite literals;
|
||||
|
||||
TODO(rfindley): investigate an un-skip the disabled test below.
|
||||
Parser recovery changed in Go 1.20, so this test requires at least that
|
||||
version for consistency.
|
||||
|
||||
-- flags --
|
||||
-ignore_extra_diags
|
||||
-min_go=go1.20
|
||||
|
||||
-- nested_complit.go --
|
||||
package nested_complit
|
||||
|
@ -15,9 +17,10 @@ type ncBar struct { //@item(structNCBar, "ncBar", "struct{...}", "struct")
|
|||
}
|
||||
|
||||
func _() {
|
||||
[]ncFoo{} //@item(litNCFoo, "[]ncFoo{}", "", "var")
|
||||
_ = []ncFoo{} //@item(litNCFoo, "[]ncFoo{}", "", "var")
|
||||
_ = make([]ncFoo, 0) //@item(makeNCFoo, "make([]ncFoo, 0)", "", "func")
|
||||
|
||||
_ := ncBar{
|
||||
// disabled - see issue #54822
|
||||
baz: [] // complete(" //", structNCFoo, structNCBar)
|
||||
baz: [] //@complete(" //", litNCFoo, makeNCFoo, structNCBar, structNCFoo)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
This file contains tests for hovering over generic Go code.
|
||||
|
||||
Requires go1.19+ for the new go/doc/comment package.
|
||||
Requires go1.20+ for the new go/doc/comment package, and a change in Go 1.20
|
||||
that affected the formatting of constraint interfaces.
|
||||
|
||||
-- flags --
|
||||
-min_go=go1.19
|
||||
-min_go=go1.20
|
||||
|
||||
-- go.mod --
|
||||
// A go.mod is require for correct pkgsite links.
|
||||
|
@ -25,10 +26,8 @@ type Value[T any] struct { //@hover("T", "T", ValueT)
|
|||
Q int //@hover("Q", "Q", ValueQ)
|
||||
}
|
||||
|
||||
// disabled - see issue #54822
|
||||
func F[P interface{ ~int | string }]() { // hover("P","P",Ptparam)
|
||||
// disabled - see issue #54822
|
||||
var _ P // hover("P","P",Pvar)
|
||||
func F[P interface{ ~int | string }]() { //@hover("P", "P", Ptparam)
|
||||
var _ P //@hover("P","P",Pvar)
|
||||
}
|
||||
|
||||
-- inferred.go --
|
||||
|
@ -76,3 +75,11 @@ field Q int
|
|||
```go
|
||||
type parameter T any
|
||||
```
|
||||
-- @Ptparam --
|
||||
```go
|
||||
type parameter P interface{~int | string}
|
||||
```
|
||||
-- @Pvar --
|
||||
```go
|
||||
type parameter P interface{~int | string}
|
||||
```
|
||||
|
|
Загрузка…
Ссылка в новой задаче