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
7package p
8
9type T int
10
11func (t T) m() {}
12
13type I interface{ m() }
14type J interface{ I }
15
16func main() {
17	var i I
18	var j J
19	var t T
20	i = t
21	j = t
22	_ = i
23	_ = j
24	i = j
25	_ = i
26	j = i
27	_ = j
28}
29