OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
compiler: Error if type switch case can not implement switch value.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
go.test
/
test
/
rename.go
1
// $G $D/$F.go && $L $F.$A && ./$A.out
2
3
// Copyright 2009 The Go Authors. All rights reserved.
4
// Use of this source code is governed by a BSD-style
5
// license that can be found in the LICENSE file.
6
7
package main
8
9
import "fmt"
10
11
func main() {
12
n :=
13
bool +
14
byte +
15
float +
16
float32 +
17
float64 +
18
int +
19
int8 +
20
int16 +
21
int32 +
22
int64 +
23
uint +
24
uint8 +
25
uint16 +
26
uint32 +
27
uint64 +
28
uintptr +
29
true +
30
false +
31
iota +
32
nil +
33
cap +
34
len +
35
make +
36
new +
37
panic +
38
print +
39
println
40
if n != 27*28/2 {
41
fmt.Println("BUG: wrong n", n, 27*28/2)
42
}
43
}
44
45
const (
46
bool = 1
47
byte = 2
48
float = 3
49
float32 = 4
50
float64 = 5
51
int = 6
52
int8 = 7
53
int16 = 8
54
int32 = 9
55
int64 = 10
56
uint = 11
57
uint8 = 12
58
uint16 = 13
59
uint32 = 14
60
uint64 = 15
61
uintptr = 16
62
true = 17
63
false = 18
64
iota = 19
65
nil = 20
66
cap = 21
67
len = 22
68
make = 23
69
new = 24
70
panic = 25
71
print = 26
72
println = 27
73
)