1
2
3
4
5
6
7 package expr1
8
9 type mybool bool
10
11 func _(x, y bool, z mybool) {
12 x = x || y
13 x = x || true
14 x = x || false
15 x = x && y
16 x = x && true
17 x = x && false
18
19 z = z || y
20 z = z || true
21 z = z || false
22 z = z && y
23 z = z && true
24 z = z && false
25 }
26
27 type myint int
28
29 func _(x, y int, z myint) {
30 x = x + 1
31 x = x + 1.0
32 x = x + 1.1
33 x = x + y
34 x = x - y
35 x = x * y
36 x = x / y
37 x = x % y
38 x = x << y
39 x = x >> y
40
41 z = z + 1
42 z = z + 1.0
43 z = z + 1.1
44 z = z + y
45 z = z - y
46 z = z * y
47 z = z / y
48 z = z % y
49 z = z << y
50 z = z >> y
51 }
52
53 type myuint uint
54
55 func _(x, y uint, z myuint) {
56 x = x + 1
57 x = x + - 1
58 x = x + 1.0
59 x = x + 1.1
60 x = x + y
61 x = x - y
62 x = x * y
63 x = x / y
64 x = x % y
65 x = x << y
66 x = x >> y
67
68 z = z + 1
69 z = x + - 1
70 z = z + 1.0
71 z = z + 1.1
72 z = z + y
73 z = z - y
74 z = z * y
75 z = z / y
76 z = z % y
77 z = z << y
78 z = z >> y
79 }
80
81 type myfloat64 float64
82
83 func _(x, y float64, z myfloat64) {
84 x = x + 1
85 x = x + -1
86 x = x + 1.0
87 x = x + 1.1
88 x = x + y
89 x = x - y
90 x = x * y
91 x = x / y
92 x = x % y
93 x = x << y
94 x = x >> y
95
96 z = z + 1
97 z = z + -1
98 z = z + 1.0
99 z = z + 1.1
100 z = z + y
101 z = z - y
102 z = z * y
103 z = z / y
104 z = z % y
105 z = z << y
106 z = z >> y
107 }
108
109 type mystring string
110
111 func _(x, y string, z mystring) {
112 x = x + "foo"
113 x = x - "foo"
114 x = x + 1
115 x = x + y
116 x = x - y
117 x = x * 10
118 }
119
120 func f() (a, b int) { return }
121
122 func _(x int) {
123 _ = f () + 1
124 _ = x + f ()
125 _ = f () + f
126 _ = f () + f ()
127 }
128
View as plain text