internal/analysisinternal: do not initialize {Get,Set}TypeErrors
Follow up from CL 241619.
Change-Id: Iab0c0e42f28bd79024e36cbfdab59eac0f2af23c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/241897
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
diff --git a/internal/analysisinternal/analysis.go b/internal/analysisinternal/analysis.go
index 311fbfd..098298c 100644
--- a/internal/analysisinternal/analysis.go
+++ b/internal/analysisinternal/analysis.go
@@ -16,6 +16,11 @@
"golang.org/x/tools/go/ast/astutil"
)
+var (
+ GetTypeErrors func(p interface{}) []types.Error
+ SetTypeErrors func(p interface{}, errors []types.Error)
+)
+
func TypeErrorEndPos(fset *token.FileSet, src []byte, start token.Pos) token.Pos {
// Get the end position for the type error.
offset, end := fset.PositionFor(start, false).Offset, start
@@ -114,9 +119,6 @@
}
}
-var GetTypeErrors = func(p interface{}) []types.Error { return nil }
-var SetTypeErrors = func(p interface{}, errors []types.Error) {}
-
type TypeErrorPass string
const (