Home | History | Annotate | Download | only in testdata

Lines Matching refs:redundant

15 	if v, w := f(), g(); v == w || v == w { // ERROR "redundant or: v == w || v == w"
17 _ = f == nil || f == nil // ERROR "redundant or: f == nil || f == nil"
23 for i, j := <-c, <-c; i == j || i == j; i, j = <-c, <-c { // ERROR "redundant or: i == j || i == j"
27 _ = i+1 == 1 || i+1 == 1 // ERROR "redundant or: i\+1 == 1 || i\+1 == 1"
28 _ = i == 1 || j+1 == i || i == 1 // ERROR "redundant or: i == 1 || i == 1"
30 _ = i == 1 || i == 1 || f() == 1 // ERROR "redundant or: i == 1 || i == 1"
32 _ = f() == 1 || i == 1 || i == 1 // ERROR "redundant or: i == 1 || i == 1"
35 _ = f() == 1 || i == 1 || i == 1 || j == 1 // ERROR "redundant or: i == 1 || i == 1"
36 _ = f() == 1 || j == 1 || i == 1 || i == 1 // ERROR "redundant or: i == 1 || i == 1"
37 _ = i == 1 || f() == 1 || i == 1 || i == 1 // ERROR "redundant or: i == 1 || i == 1"
38 _ = i == 1 || i == 1 || f() == 1 || i == 1 // ERROR "redundant or: i == 1 || i == 1"
39 _ = i == 1 || i == 1 || j == 1 || f() == 1 // ERROR "redundant or: i == 1 || i == 1"
40 _ = j == 1 || i == 1 || i == 1 || f() == 1 // ERROR "redundant or: i == 1 || i == 1"
43 _ = i == 1 || (i == 1 || i == 2) // ERROR "redundant or: i == 1 || i == 1"
45 _ = i == 1 || (i == 1 || f() == 1) // ERROR "redundant or: i == 1 || i == 1"
46 _ = i == 1 || (i == 2 || (i == 1 || i == 3)) // ERROR "redundant or: i == 1 || i == 1"
49 _ = i == 1 || (a || (i == 1 || b)) // ERROR "redundant or: i == 1 || i == 1"
51 // Check that all redundant ors are flagged
55 j == 0 || // ERROR "redundant or: j == 0 || j == 0"
56 i == 1 || // ERROR "redundant or: i == 1 || i == 1"
57 i == 1 || // ERROR "redundant or: i == 1 || i == 1"
62 _ = i == 1*2*3 || i == 1*2*3 // ERROR "redundant or: i == 1\*2\*3 || i == 1\*2\*3"
64 // These test that redundant, suspect expressions do not trigger multiple errors.
65 _ = i != 0 || i != 0 // ERROR "redundant or: i != 0 || i != 0"
66 _ = i == 0 && i == 0 // ERROR "redundant and: i == 0 && i == 0"
72 _ = f != nil && f != nil // ERROR "redundant and: f != nil && f != nil"
73 _ = i != 1 && i != 1 && f() != 1 // ERROR "redundant and: i != 1 && i != 1"
75 _ = f() != 1 && i != 1 && i != 1 // ERROR "redundant and: i != 1 && i != 1"