projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
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
/
CheckDoubleNegation
/
CheckDoubleNegation.go
1
package pkg
2
3
func fn(b1, b2 bool) {
4
if !!b1 { // want `negating a boolean twice`
5
println()
6
}
7
8
if b1 && !!b2 { // want `negating a boolean twice`
9
println()
10
}
11
12
if !(!b1) { // want `negating a boolean twice`
13
println()
14
}
15
16
if !b1 {
17
println()
18
}
19
20
if !b1 && !b2 {
21
println()
22
}
23
}