x/tools/cmd/eg: matches should be limited to value expressions #14728
Labels
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
The problem appears to be that in the type expression
**int
, the subexpression*int
has type*int
, so eg is deciding that it's a candidate match for the original expression. However,*int
is a type expression, so it doesn't make sense to replace it with a value expression like42
.I think eg needs to make use of
go/types.TypeAndValue
'sIsValue
method./cc @alandonovan
The text was updated successfully, but these errors were encountered: