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: init0.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. // initialization cycles package init0 // initialization cycles (we don't know the types) const ( s0 /* ERROR initialization cycle */ = s0 x0 /* ERROR initialization cycle */ = y0 y0 = x0 a0 = b0 b0 /* ERROR initialization cycle */ = c0 c0 = d0 d0 = b0 ) var ( s1 /* ERROR initialization cycle */ = s1 x1 /* ERROR initialization cycle */ = y1 y1 = x1 a1 = b1 b1 /* ERROR initialization cycle */ = c1 c1 = d1 d1 = b1 ) // initialization cycles (we know the types) const ( s2 /* ERROR initialization cycle */ int = s2 x2 /* ERROR initialization cycle */ int = y2 y2 = x2 a2 = b2 b2 /* ERROR initialization cycle */ int = c2 c2 = d2 d2 = b2 ) var ( s3 /* ERROR initialization cycle */ int = s3 x3 /* ERROR initialization cycle */ int = y3 y3 = x3 a3 = b3 b3 /* ERROR initialization cycle */ int = c3 c3 = d3 d3 = b3 ) // cycles via struct fields type S1 struct { f int } const cx3 S1 /* ERROR invalid constant type */ = S1{cx3.f} var vx3 /* ERROR initialization cycle */ S1 = S1{vx3.f} // cycles via functions var x4 = x5 var x5 /* ERROR initialization cycle */ = f1() func f1() int { return x5*10 } var x6, x7 /* ERROR initialization cycle */ = f2() var x8 = x7 func f2() (int, int) { return f3() + f3(), 0 } func f3() int { return x8 } // cycles via function literals var x9 /* ERROR initialization cycle */ = func() int { return x9 }() var x10 /* ERROR initialization cycle */ = f4() func f4() int { _ = func() { _ = x10 } return 0 } // cycles via method expressions type T1 struct{} func (T1) m() bool { _ = x11; return false } var x11 /* ERROR initialization cycle */ = T1.m(T1{}) // cycles via method values type T2 struct{} func (T2) m() bool { _ = x12; return false } var t1 T2 var x12 /* ERROR initialization cycle */ = t1.m
Upload File
Create Folder