fix for gofmt rewrite matcher bug

R=rsc
CC=golang-dev
https://golang.org/cl/179096
This commit is contained in:
Robert Griesemer 2009-12-17 15:23:19 -08:00
parent 6a4b2492b3
commit 4ddcb0ea73

View File

@ -134,6 +134,9 @@ func match(m map[string]reflect.Value, pattern, val reflect.Value) bool {
p := reflect.Indirect(pattern)
v := reflect.Indirect(val)
if p == nil || v == nil {
return p == nil && v == nil
}
switch p := p.(type) {
case *reflect.SliceValue: