diff options
Diffstat (limited to 'gcc/testsuite/go.test/test/fixedbugs/bug367.dir/main.go')
-rw-r--r-- | gcc/testsuite/go.test/test/fixedbugs/bug367.dir/main.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/main.go new file mode 100644 index 0000000000..21e9a5002c --- /dev/null +++ b/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/main.go @@ -0,0 +1,24 @@ +package main + +import ( + "./p" +) + +type T struct{ *p.S } +type I interface { + get() +} + +func main() { + var t T + p.F(t) + var x interface{} = t + _, ok := x.(I) + if ok { + panic("should not satisfy main.I") + } + _, ok = x.(p.I) + if !ok { + panic("should satisfy p.I") + } +} |