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 10func (t T) m() {} 11 12type I interface { m() } 13type J interface { I } 14 15func 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} 28