X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fcoc-go-data%2Ftools%2Fpkg%2Fmod%2Fgolang.org%2Fx%2Ftools%40v0.0.0-20201028153306-37f0764111ff%2Fgo%2Fssa%2Finterp%2Ftestdata%2Fifaceprom.go;fp=.config%2Fcoc%2Fextensions%2Fcoc-go-data%2Ftools%2Fpkg%2Fmod%2Fgolang.org%2Fx%2Ftools%40v0.0.0-20201028153306-37f0764111ff%2Fgo%2Fssa%2Finterp%2Ftestdata%2Fifaceprom.go;h=0000000000000000000000000000000000000000;hb=3ddadb3c98564791f0ac36cb39771d844a63dc91;hp=414dc7363637e1157725a77786914ef5b4649d9a;hpb=5f797af6612ed10887189b47a1efc2f915586e59;p=dotfiles%2F.git diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201028153306-37f0764111ff/go/ssa/interp/testdata/ifaceprom.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201028153306-37f0764111ff/go/ssa/interp/testdata/ifaceprom.go deleted file mode 100644 index 414dc736..00000000 --- a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201028153306-37f0764111ff/go/ssa/interp/testdata/ifaceprom.go +++ /dev/null @@ -1,58 +0,0 @@ -package main - -// Test of promotion of methods of an interface embedded within a -// struct. In particular, this test exercises that the correct -// method is called. - -type I interface { - one() int - two() string -} - -type S struct { - I -} - -type impl struct{} - -func (impl) one() int { - return 1 -} - -func (impl) two() string { - return "two" -} - -func main() { - var s S - s.I = impl{} - if one := s.I.one(); one != 1 { - panic(one) - } - if one := s.one(); one != 1 { - panic(one) - } - closOne := s.I.one - if one := closOne(); one != 1 { - panic(one) - } - closOne = s.one - if one := closOne(); one != 1 { - panic(one) - } - - if two := s.I.two(); two != "two" { - panic(two) - } - if two := s.two(); two != "two" { - panic(two) - } - closTwo := s.I.two - if two := closTwo(); two != "two" { - panic(two) - } - closTwo = s.two - if two := closTwo(); two != "two" { - panic(two) - } -}