Go AST: Why is FuncDecl.Recv is of type *FieldList

113 Views Asked by At

In the go/ast docs the type of FuncDecl.Recv is *FieldList instead of *Field. It parses multiple receivers just fine.

But compiler throws error on passing multiple recievers

method has multiple receivers

Go Playground(Uncomment line 13 to see error)

So is this a mistake? or is it there for future releases? Does it have any significance?

0

There are 0 best solutions below