Skip to content

Commit 829b64c

Browse files
committed
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 <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent ee59f6d commit 829b64c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/fix/cftype.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func typefix(f *ast.File, badType func(string) bool) bool {
119119
if !ok {
120120
return
121121
}
122-
t := s.X.(*ast.SelectorExpr)
122+
t, ok := s.X.(*ast.SelectorExpr)
123123
if !ok {
124124
return
125125
}

0 commit comments

Comments
 (0)