go recursive 源码

  • 2022-07-15
  • 浏览 (851)

golang recursive 代码

文件路径:/test/interface/recursive.go

// compile

// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Check mutually recursive interfaces

package recursive

type I1 interface {
	foo() I2
}

type I2 interface {
	bar() I1
}

type T int
func (t T) foo() I2 { return t }
func (t T) bar() I1 { return t }

相关信息

go 源码目录

相关文章

go assertinline 源码

go bigdata 源码

go convert 源码

go convert1 源码

go convert2 源码

go embed 源码

go embed1 源码

go embed2 源码

go embed3 源码

go explicit 源码

0  赞