]> Cypherpunks repositories - gostls13.git/commitdiff
go/ast: document that ast.FilterFile always filters imports
authorRobert Griesemer <gri@golang.org>
Fri, 23 Jan 2015 19:45:00 +0000 (11:45 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 23 Jan 2015 19:52:07 +0000 (19:52 +0000)
Fixes #9248.

Change-Id: Id1c50af5eb35d7720b8f0a4d4881414baf061d56
Reviewed-on: https://go-review.googlesource.com/3241
Reviewed-by: Alan Donovan <adonovan@google.com>
src/go/ast/filter.go

index fc3eeb4a1db73d5c9c5b42f0688df43cd9746596..50e576ec044393635a25ee18c41cfb3a539ab087 100644 (file)
@@ -221,8 +221,8 @@ func filterDecl(decl Decl, f Filter, export bool) bool {
 // names from top-level declarations (including struct field and
 // interface method names, but not from parameter lists) that don't
 // pass through the filter f. If the declaration is empty afterwards,
-// the declaration is removed from the AST. The File.Comments list
-// is not changed.
+// the declaration is removed from the AST. Import declarations are
+// always removed. The File.Comments list is not changed.
 //
 // FilterFile returns true if there are any top-level declarations
 // left after filtering; it returns false otherwise.