aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2018-02-09 11:21:37 -0800
committerKeith Randall <khr@golang.org>2018-02-09 19:47:55 +0000
commit829b64c1ead819bdf84d950581020c36f00cd02b (patch)
treea89df78c8c368efc2c0d399abdd1b91e4c8548a6
parentee59f6dff2c25b39d12b16082343a74c825b5ea1 (diff)
downloadgo-829b64c1ead819bdf84d950581020c36f00cd02b.tar.gz
go-829b64c1ead819bdf84d950581020c36f00cd02b.zip
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>
-rw-r--r--src/cmd/fix/cftype.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/fix/cftype.go b/src/cmd/fix/cftype.go
index df1cc18f9e..b47b06682a 100644
--- a/src/cmd/fix/cftype.go
+++ b/src/cmd/fix/cftype.go
@@ -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
}