Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.0.1-2020.1.5 / unused / testdata / src / interfaces / interfaces.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.0.1-2020.1.5/unused/testdata/src/interfaces/interfaces.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.0.1-2020.1.5/unused/testdata/src/interfaces/interfaces.go
new file mode 100644 (file)
index 0000000..59b1be7
--- /dev/null
@@ -0,0 +1,46 @@
+package pkg
+
+type I interface {
+       fn1()
+}
+
+type t struct{}
+
+func (t) fn1() {}
+func (t) fn2() {} // want `fn2`
+
+func init() {
+       _ = t{}
+}
+
+type I1 interface {
+       Foo()
+}
+
+type I2 interface {
+       Foo()
+       bar()
+}
+
+type t1 struct{}
+type t2 struct{}
+type t3 struct{}
+type t4 struct{ t3 }
+
+func (t1) Foo() {}
+func (t2) Foo() {}
+func (t2) bar() {}
+func (t3) Foo() {}
+func (t3) bar() {}
+
+func Fn() {
+       var v1 t1
+       var v2 t2
+       var v3 t3
+       var v4 t4
+       _ = v1
+       _ = v2
+       _ = v3
+       var x interface{} = v4
+       _ = x.(I2)
+}