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 / typeassert / type_assert.go
1 package typeassert
2
3 type abc interface { //@item(abcIntf, "abc", "interface{...}", "interface")
4         abc()
5 }
6
7 type abcImpl struct{} //@item(abcImpl, "abcImpl", "struct{...}", "struct")
8 func (abcImpl) abc()
9
10 type abcPtrImpl struct{} //@item(abcPtrImpl, "abcPtrImpl", "struct{...}", "struct")
11 func (*abcPtrImpl) abc()
12
13 type abcNotImpl struct{} //@item(abcNotImpl, "abcNotImpl", "struct{...}", "struct")
14
15 func _() {
16         *abcPtrImpl //@item(abcPtrImplPtr, "*abcPtrImpl", "struct{...}", "struct")
17
18         var a abc
19         switch a.(type) {
20         case ab: //@complete(":", abcPtrImplPtr, abcImpl, abcIntf, abcNotImpl)
21         case *ab: //@complete(":", abcImpl, abcPtrImpl, abcIntf, abcNotImpl)
22         }
23
24         a.(ab)  //@complete(")", abcPtrImplPtr, abcImpl, abcIntf, abcNotImpl)
25         a.(*ab) //@complete(")", abcImpl, abcPtrImpl, abcIntf, abcNotImpl)
26 }