aboutsummaryrefslogtreecommitdiff
path: root/gopls/internal/lsp/testdata/symbols/go1.18.go
diff options
context:
space:
mode:
Diffstat (limited to 'gopls/internal/lsp/testdata/symbols/go1.18.go')
-rw-r--r--gopls/internal/lsp/testdata/symbols/go1.18.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/gopls/internal/lsp/testdata/symbols/go1.18.go b/gopls/internal/lsp/testdata/symbols/go1.18.go
new file mode 100644
index 000000000..cdf99dc20
--- /dev/null
+++ b/gopls/internal/lsp/testdata/symbols/go1.18.go
@@ -0,0 +1,16 @@
+//go:build go1.18
+// +build go1.18
+
+package main
+
+type T[P any] struct { //@symbol("T", "T", "Struct", "struct{...}", "T", "")
+ F P //@symbol("F", "F", "Field", "P", "", "T")
+}
+
+type Constraint interface { //@symbol("Constraint", "Constraint", "Interface", "interface{...}", "Constraint", "")
+ ~int | struct{ int } //@symbol("~int | struct{int}", "~int | struct{ int }", "Field", "", "", "Constraint")
+
+ // TODO(rfindley): the selection range below is the entire interface field.
+ // Can we reduce it?
+ interface{ M() } //@symbol("interface{...}", "interface{ M() }", "Field", "", "iFaceField", "Constraint"), symbol("M", "M", "Method", "func()", "", "iFaceField")
+}