x/tools/go/astutil: PathEnclosingInterval omits FuncType for intervals in the function signature #68202
Labels
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Invoking PathEnclosingInterval on the extent of
x
in this program:gives this result:
The FuncType--FuncDecl.Type, which holds the Params FieldList--is nowhere to be seen.
I'm sure this is because the invariant that each node contains its children has an edge case for FuncType: the FuncDecl for
func f(x int)
has a FuncType that includes thefunc
token and the(x int)
signature but not the namef
(FuncDecl.Name), or the receiver for a method.I'm amazed we haven't noticed this before.
The text was updated successfully, but these errors were encountered: