From 829b64c1ead819bdf84d950581020c36f00cd02b Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Fri, 9 Feb 2018 11:21:37 -0800 Subject: [PATCH] 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 Reviewed-by: Brad Fitzpatrick Reviewed-by: Ian Lance Taylor TryBot-Result: Gobot Gobot --- src/cmd/fix/cftype.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/fix/cftype.go b/src/cmd/fix/cftype.go index df1cc18f9ead3..b47b06682add8 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 }