mirror of
https://github.com/golang/go
synced 2024-11-25 07:57:56 -07:00
fix for gofmt rewrite matcher bug
R=rsc CC=golang-dev https://golang.org/cl/179096
This commit is contained in:
parent
6a4b2492b3
commit
4ddcb0ea73
@ -134,6 +134,9 @@ func match(m map[string]reflect.Value, pattern, val reflect.Value) bool {
|
|||||||
|
|
||||||
p := reflect.Indirect(pattern)
|
p := reflect.Indirect(pattern)
|
||||||
v := reflect.Indirect(val)
|
v := reflect.Indirect(val)
|
||||||
|
if p == nil || v == nil {
|
||||||
|
return p == nil && v == nil
|
||||||
|
}
|
||||||
|
|
||||||
switch p := p.(type) {
|
switch p := p.(type) {
|
||||||
case *reflect.SliceValue:
|
case *reflect.SliceValue:
|
||||||
|
Loading…
Reference in New Issue
Block a user