1
0
mirror of https://github.com/golang/go synced 2024-11-19 20:34:42 -07:00

cmd/fix: fix cast check

Need 2-result cast so we can check the result correctly.

Fixes #23762

Change-Id: Icac3a5415156fe918988f369d6022a9a29c14089
Reviewed-on: https://go-review.googlesource.com/93078
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Keith Randall 2018-02-09 11:21:37 -08:00
parent ee59f6dff2
commit 829b64c1ea

View File

@ -119,7 +119,7 @@ func typefix(f *ast.File, badType func(string) bool) bool {
if !ok {
return
}
t := s.X.(*ast.SelectorExpr)
t, ok := s.X.(*ast.SelectorExpr)
if !ok {
return
}