pattern: guard against nil FieldList
@@ -158,8 +158,12 @@ func match(m *Matcher, l, r interface{}) (interface{}, bool) {
case *ast.BlockStmt:
return match(m, l.List, r)
case *ast.FieldList:
+ if l == nil {
+ return match(m, nil, r)
+ } else {
return match(m, l.List, r)
}
+ }
switch r := r.(type) {
case *ast.ParenExpr:
