X7ROOT File Manager
Current Path:
/opt/golang/1.19.4/src/cmd/compile/internal/types2/testdata/check
opt
/
golang
/
1.19.4
/
src
/
cmd
/
compile
/
internal
/
types2
/
testdata
/
check
/
📁
..
📄
blank.go
(203 B)
📄
builtins0.go
(23.81 KB)
📄
builtins1.go
(5.46 KB)
📄
chans.go
(1.66 KB)
📄
compliterals.go
(442 B)
📄
const0.go
(9.18 KB)
📄
const1.go
(8.56 KB)
📄
constdecl.go
(3.67 KB)
📄
conversions0.go
(1.71 KB)
📄
conversions1.go
(5.07 KB)
📄
cycles0.go
(2.85 KB)
📄
cycles1.go
(781 B)
📄
cycles2.go
(1.12 KB)
📄
cycles3.go
(675 B)
📄
cycles4.go
(2.03 KB)
📄
cycles5.go
(2.98 KB)
📄
decls0.go
(3.97 KB)
📄
decls1.go
(3.6 KB)
📁
decls2
📄
decls3.go
(4.24 KB)
📄
decls4.go
(3.1 KB)
📄
decls5.go
(363 B)
📄
errors.go
(2.16 KB)
📄
expr0.go
(3.7 KB)
📄
expr1.go
(2.61 KB)
📄
expr2.go
(4.92 KB)
📄
expr3.go
(15.42 KB)
📄
funcinference.go
(2.07 KB)
📄
go1_12.go
(1.07 KB)
📄
go1_13.go
(402 B)
📄
go1_16.go
(343 B)
📄
go1_8.go
(333 B)
📄
gotos.go
(5.77 KB)
📄
importC.go
(1.23 KB)
📁
importdecl0
📁
importdecl1
📄
init0.go
(1.91 KB)
📄
init1.go
(1.46 KB)
📄
init2.go
(3.51 KB)
📁
issue25008
📄
issues0.go
(11.44 KB)
📄
issues1.go
(6.02 KB)
📄
labels.go
(3.25 KB)
📄
linalg.go
(2.24 KB)
📄
literals.go
(2.35 KB)
📄
main0.go
(361 B)
📄
main1.go
(250 B)
📄
map0.go
(2.82 KB)
📄
map1.go
(3.4 KB)
📄
methodsets.go
(3.44 KB)
📄
shifts.go
(12.62 KB)
📄
slices.go
(1.51 KB)
📄
stmt0.go
(18.68 KB)
📄
stmt1.go
(3.31 KB)
📄
typeinference.go
(1.38 KB)
📄
typeinst0.go
(1.62 KB)
📄
typeinst1.go
(5.65 KB)
📄
typeinstcycles.go
(384 B)
📄
typeparams.go
(15.06 KB)
📄
unions.go
(2.15 KB)
📄
vardecl.go
(5.47 KB)
Editing: cycles0.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 cycles import "unsafe" type ( T0 int T1 /* ERROR cycle */ T1 T2 *T2 T3 /* ERROR cycle */ T4 T4 T5 T5 T3 T6 T7 T7 *T8 T8 T6 // arrays A0 /* ERROR cycle */ [10]A0 A1 [10]*A1 A2 /* ERROR cycle */ [10]A3 A3 [10]A4 A4 A2 A5 [10]A6 A6 *A5 // slices L0 []L0 // structs S0 /* ERROR cycle */ struct{ _ S0 } S1 /* ERROR cycle */ struct{ S1 } S2 struct{ _ *S2 } S3 struct{ *S3 } S4 /* ERROR cycle */ struct{ S5 } S5 struct{ S6 } S6 S4 // pointers P0 *P0 PP *struct{ PP.f /* ERROR no field or method f */ } // functions F0 func(F0) F1 func() F1 F2 func(F2) F2 // interfaces I0 /* ERROR cycle */ interface{ I0 } I1 /* ERROR cycle */ interface{ I2 } I2 interface{ I3 } I3 interface{ I1 } I4 interface{ f(I4) } // testcase for issue 5090 I5 interface{ f(I6) } I6 interface{ I5 } // maps M0 map[M0 /* ERROR invalid map key */ ]M0 // channels C0 chan C0 ) // test case for issue #34771 type ( AA /* ERROR cycle */ B B C C [10]D D E E AA ) func _() { type ( t1 /* ERROR cycle */ t1 t2 *t2 t3 t4 /* ERROR undeclared */ t4 t5 /* ERROR undeclared */ t5 t3 // arrays a0 /* ERROR cycle */ [10]a0 a1 [10]*a1 // slices l0 []l0 // structs s0 /* ERROR cycle */ struct{ _ s0 } s1 /* ERROR cycle */ struct{ s1 } s2 struct{ _ *s2 } s3 struct{ *s3 } // pointers p0 *p0 // functions f0 func(f0) f1 func() f1 f2 func(f2) f2 // interfaces i0 /* ERROR cycle */ interface{ i0 } // maps m0 map[m0 /* ERROR invalid map key */ ]m0 // channels c0 chan c0 ) } // test cases for issue 6667 type A [10]map[A /* ERROR invalid map key */ ]bool type S struct { m map[S /* ERROR invalid map key */ ]bool } // test cases for issue 7236 // (cycle detection must not be dependent on starting point of resolution) type ( P1 *T9 T9 /* ERROR cycle */ T9 T10 /* ERROR cycle */ T10 P2 *T10 ) func (T11) m() {} type T11 /* ERROR cycle */ struct{ T11 } type T12 /* ERROR cycle */ struct{ T12 } func (*T12) m() {} type ( P3 *T13 T13 /* ERROR cycle */ T13 ) // test cases for issue 18643 // (type cycle detection when non-type expressions are involved) type ( T14 [len(T14 /* ERROR cycle */ {})]int T15 [][len(T15 /* ERROR cycle */ {})]int T16 map[[len(T16 /* ERROR cycle */ {1:2})]int]int T17 map[int][len(T17 /* ERROR cycle */ {1:2})]int ) // Test case for types depending on function literals (see also #22992). type T20 chan [unsafe.Sizeof(func(ch T20){ _ = <-ch })]byte type T22 = chan [unsafe.Sizeof(func(ch T20){ _ = <-ch })]byte func _() { type T0 func(T0) type T1 /* ERROR cycle */ = func(T1) type T2 chan [unsafe.Sizeof(func(ch T2){ _ = <-ch })]byte type T3 /* ERROR cycle */ = chan [unsafe.Sizeof(func(ch T3){ _ = <-ch })]byte }
Upload File
Create Folder