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
/
golang.org
/
x
/
tools@v0.0.0-20201028153306-37f0764111ff
/
refactor
/
eg
/
testdata
/
F1.go
1
// +build ignore
2
3
package F1
4
5
import "sync"
6
7
func example(n int) {
8
var x struct {
9
mutex sync.RWMutex
10
}
11
12
var y struct {
13
sync.RWMutex
14
}
15
16
type l struct {
17
sync.RWMutex
18
}
19
20
var z struct {
21
l
22
}
23
24
var a struct {
25
*l
26
}
27
28
var b struct{ Lock func() }
29
30
// Match
31
x.mutex.Lock()
32
33
// Match
34
y.Lock()
35
36
// Match indirect
37
z.Lock()
38
39
// Should be no match however currently matches due to:
40
// https://golang.org/issue/8584
41
// Will start failing when this is fixed then just change golden to
42
// No match pointer indirect
43
// a.Lock()
44
a.Lock()
45
46
// No match
47
b.Lock()
48
}