Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.0.0-20201028153306-37f0764111ff / internal / lsp / testdata / arraytype / array_type.go.in
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201028153306-37f0764111ff/internal/lsp/testdata/arraytype/array_type.go.in b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201028153306-37f0764111ff/internal/lsp/testdata/arraytype/array_type.go.in
new file mode 100644 (file)
index 0000000..a53ee74
--- /dev/null
@@ -0,0 +1,43 @@
+package arraytype
+
+import (
+       "golang.org/x/tools/internal/lsp/foo"
+)
+
+func _() {
+       var (
+               val string //@item(atVal, "val", "string", "var")
+       )
+
+       [] //@complete(" //", PackageFoo)
+
+       []val //@complete(" //")
+
+       []foo.StructFoo //@complete(" //", StructFoo)
+
+       []foo.StructFoo(nil) //@complete("(", StructFoo)
+
+       []*foo.StructFoo //@complete(" //", StructFoo)
+
+       [...]foo.StructFoo //@complete(" //", StructFoo)
+
+       [2][][4]foo.StructFoo //@complete(" //", StructFoo)
+
+       []struct { f []foo.StructFoo } //@complete(" }", StructFoo)
+}
+
+func _() {
+       type myInt int //@item(atMyInt, "myInt", "int", "type")
+
+       var mark []myInt //@item(atMark, "mark", "[]myInt", "var")
+
+       var s []myInt //@item(atS, "s", "[]myInt", "var")
+       s = []m //@complete(" //", atMyInt)
+       s = [] //@complete(" //", atMyInt, PackageFoo)
+
+       var a [1]myInt
+       a = [1]m //@complete(" //", atMyInt)
+
+       var ds [][]myInt
+       ds = [][]m //@complete(" //", atMyInt)
+}