403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/go/src/internal/types/testdata/check/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/go/src/internal/types/testdata/check//cycles1.go
// Copyright 2013 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.

package p

type (
	A interface {
		a() interface {
			ABC1
		}
	}
	B interface {
		b() interface {
			ABC2
		}
	}
	C interface {
		c() interface {
			ABC3
		}
	}

	AB interface {
		A
		B
	}
	BC interface {
		B
		C
	}

	ABC1 interface {
		A
		B
		C
	}
	ABC2 interface {
		AB
		C
	}
	ABC3 interface {
		A
		BC
	}
)

var (
	x1 ABC1
	x2 ABC2
	x3 ABC3
)

func _() {
	// all types have the same method set
	x1 = x2
	x2 = x1

	x1 = x3
	x3 = x1

	x2 = x3
	x3 = x2

	// all methods return the same type again
	x1 = x1.a()
	x1 = x1.b()
	x1 = x1.c()

	x2 = x2.a()
	x2 = x2.b()
	x2 = x2.c()

	x3 = x3.a()
	x3 = x3.b()
	x3 = x3.c()
}

Youez - 2016 - github.com/yon3zu
LinuXploit