@@ -28,28 +28,28 @@ func noUseParams(params string) int {
28
28
29
29
func f (param int ) int {
30
30
println (param )
31
- useOutOfIf := 1212121 // want "wasted assignment "
31
+ useOutOfIf := 1212121 // want "reassigned, but reassigned without using the value "
32
32
ret := 0
33
33
if false {
34
34
useOutOfIf = 200 // want "reassigned, but never used afterwards"
35
35
return 0
36
36
} else if param == 100 {
37
- useOutOfIf = 100 // want "wasted assignment "
37
+ useOutOfIf = 100 // want "reassigned, but reassigned without using the value "
38
38
useOutOfIf = 201
39
39
useOutOfIf = pa (useOutOfIf )
40
- useOutOfIf += 200 // want "wasted assignment "
40
+ useOutOfIf += 200 // want "reassigned, but reassigned without using the value "
41
41
} else {
42
42
useOutOfIf = 100
43
43
useOutOfIf += 100
44
44
useOutOfIf = pa (useOutOfIf )
45
- useOutOfIf += 200 // want "wasted assignment "
45
+ useOutOfIf += 200 // want "reassigned, but reassigned without using the value "
46
46
}
47
47
48
48
if false {
49
49
useOutOfIf = 200 // want "reassigned, but never used afterwards"
50
50
return 0
51
51
} else if param == 200 {
52
- useOutOfIf = 100 // want "wasted assignment "
52
+ useOutOfIf = 100 // want "reassigned, but reassigned without using the value "
53
53
useOutOfIf = 201
54
54
useOutOfIf = pa (useOutOfIf )
55
55
useOutOfIf += 200
@@ -92,10 +92,10 @@ func r(param int) int {
92
92
} else if param == 100 {
93
93
ret = useOutOfIf
94
94
} else if param == 200 {
95
- useOutOfIf = 100 // want "wasted assignment "
95
+ useOutOfIf = 100 // want "reassigned, but reassigned without using the value "
96
96
useOutOfIf = 100
97
97
useOutOfIf = pa (useOutOfIf )
98
- useOutOfIf += 200 // want "wasted assignment "
98
+ useOutOfIf += 200 // want "reassigned, but reassigned without using the value "
99
99
}
100
100
useOutOfIf = 12
101
101
println (useOutOfIf )
@@ -109,7 +109,7 @@ func mugen() {
109
109
var i int
110
110
var hoge int
111
111
for {
112
- hoge = 5 // want "wasted assignment "
112
+ hoge = 5 // want "reassigned, but reassigned without using the value "
113
113
// break
114
114
}
115
115
0 commit comments