Debian Codegraph @

gcc/testsuite/go.test/test/interface/embed1.dir/embed0.go

raw
1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Test that embedded interface types can have local methods.
6
7 package p
8
9 type T int
10 func (t T) m() {}
11
12 type I interface { m() }
13 type J interface { I }
14
15 func main() {
16 var i I
17 var j J
18 var t T
19 i = t
20 j = t
21 _ = i
22 _ = j
23 i = j
24 _ = i
25 j = i
26 _ = j
27 }