Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.0.1-2020.1.5 / staticcheck / testdata / src / CheckLhsRhsIdentical / CheckLhsRhsIdentical.go
1 package pkg
2
3 type Float float64
4
5 type Floats [5]float64
6 type Ints [5]int
7
8 type T1 struct {
9         A float64
10         B float64
11 }
12
13 type T2 struct {
14         A float64
15         B int
16 }
17
18 func fn(a int, s []int, f1 float64, f2 Float, fs Floats, is Ints, t1 T1, t2 T2) {
19         if 0 == 0 { // want `identical expressions`
20                 println()
21         }
22         if 1 == 1 { // want `identical expressions`
23                 println()
24         }
25         if a == a { // want `identical expressions`
26                 println()
27         }
28         if a != a { // want `identical expressions`
29                 println()
30         }
31         if s[0] == s[0] { // want `identical expressions`
32                 println()
33         }
34         if 1&1 == 1 { // want `identical expressions`
35                 println()
36         }
37         if (1 + 2 + 3) == (1 + 2 + 3) { // want `identical expressions`
38                 println()
39         }
40         if f1 == f1 {
41                 println()
42         }
43         if f1 != f1 {
44                 println()
45         }
46         if f1 > f1 { // want `identical expressions`
47                 println()
48         }
49         if f2 == f2 {
50                 println()
51         }
52         if fs == fs {
53                 println()
54         }
55         if is == is { // want `identical expressions`
56                 println()
57         }
58         if t1 == t1 {
59                 println()
60         }
61         if t2 == t2 { // want `identical expressions`
62                 println()
63         }
64 }