Commit 248b94e
committed
go/ast/inspector: treat empty type filter like nil
The documentation for type filtering speaks only of the
length of the slice, but the logic checks for nil.
Fix the logic to match the documentation.
(This is an observable change but there is never any
reason to pass []ast.Node{}... as a type filter.)
Change-Id: Ifa8f72c0c2ff5a4c0fc2ee39e65641503a93c471
Reviewed-on: https://go-review.googlesource.com/c/tools/+/641436
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>1 parent 6016188 commit 248b94e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
0 commit comments