Open
Description
(Edit: the below is using 10bff91)
This patch
@@
@@
func f() (...) {
- fmt.Println("")
+ fmt.Println("hello")
...
}
will match against
package foo
func f() (string, error) {
fmt.Println("")
return "", nil
}
but not
package foo
func f() string {
fmt.Println("")
return ""
}
I thought the parentheses were forcing more than one return type, so I tried patching without them
@@
@@
func f() ... {
- return ""
+ return "hello"
}
however this is not a valid patch:
load patch "repro": parse: repro/0.minus:1:11: found unexpected "..." inside *ast.FieldList
This isn't a big deal -- I can repeat the patch for 1 return type and N return types.
Intuitively, I would have thought "(...)" already represents "zero to N" return types, although I could also be totally misunderstanding the syntax!