Skip to content

Commit 314368d

Browse files
adonovangopherbot
authored andcommitted
go/analysis/passes/deepequalerrors: audit for types.Alias safety
Updates golang/go#65294 Change-Id: I00543b00c830ff5a4fe442f1bcf6f21ab0b12d97 Reviewed-on: https://go-review.googlesource.com/c/tools/+/559916 Reviewed-by: Tim King <[email protected]> Auto-Submit: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent f4fa7a7 commit 314368d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

go/analysis/passes/deepequalerrors/deepequalerrors.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"golang.org/x/tools/go/analysis/passes/internal/analysisutil"
1616
"golang.org/x/tools/go/ast/inspector"
1717
"golang.org/x/tools/go/types/typeutil"
18+
"golang.org/x/tools/internal/aliases"
1819
)
1920

2021
const Doc = `check for calls of reflect.DeepEqual on error values
@@ -101,7 +102,8 @@ func containsError(typ types.Type) bool {
101102
return true
102103
}
103104
}
104-
case *types.Named:
105+
case *types.Named,
106+
*aliases.Alias:
105107
return check(t.Underlying())
106108

107109
// We list the remaining valid type kinds for completeness.

0 commit comments

Comments
 (0)