repo.or.cz
/
binutils-gdb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Rename gdb/ChangeLog to gdb/ChangeLog-2021
[binutils-gdb.git]
/
gdb
/
testsuite
/
gdb.go
/
types.go
blob
be9179f18bc29a6da09258bac992bf43b0c4bf70
1
package
main
2
3
import
"fmt"
4
5
// Self-referential type.
6
type
T
*
T
7
8
// Mutually recursive types.
9
type
T1
*
T2
10
type
T2
*
T1
11
12
// Mutually recursive struct types.
13
type
S1
struct
{
p_s2
*
S2
}
14
type
S2
struct
{
p_s1
*
S1
}
15
16
func
main
() {
17
fmt
.
Println
(
"Shall we?"
)
18
var
t T
19
fmt
.
Println
(
t
)
20
var
s1 S1
21
var
s2 S2
22
fmt
.
Println
(
s1
)
23
fmt
.
Println
(
s2
)
24
}